mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Retry timeout and retryable error
This commit is contained in:
@ -810,7 +810,7 @@ func (c *ClusterClient) _process(ctx context.Context, cmd Cmder) error {
|
||||
continue
|
||||
}
|
||||
|
||||
if isRetryableError(lastErr, cmd.readTimeout() == nil) {
|
||||
if shouldRetry(lastErr, cmd.readTimeout() == nil) {
|
||||
// First retry the same node.
|
||||
if attempt == 0 {
|
||||
continue
|
||||
@ -1466,7 +1466,7 @@ func (c *ClusterClient) Watch(ctx context.Context, fn func(*Tx) error, keys ...s
|
||||
continue
|
||||
}
|
||||
|
||||
if isRetryableError(err, true) {
|
||||
if shouldRetry(err, true) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user