mirror of
https://github.com/redis/go-redis.git
synced 2025-04-17 20:17:02 +03:00
redis: nil should not be retried
This commit is contained in:
parent
cb3aa19618
commit
625a6f2a75
2
error.go
2
error.go
@ -51,7 +51,7 @@ func shouldRetry(err error, retryTimeout bool) bool {
|
|||||||
switch err {
|
switch err {
|
||||||
case io.EOF, io.ErrUnexpectedEOF:
|
case io.EOF, io.ErrUnexpectedEOF:
|
||||||
return true
|
return true
|
||||||
case nil, context.Canceled, context.DeadlineExceeded:
|
case nil, Nil, context.Canceled, context.DeadlineExceeded:
|
||||||
return false
|
return false
|
||||||
case pool.ErrPoolTimeout:
|
case pool.ErrPoolTimeout:
|
||||||
// connection pool timeout, increase retries. #3289
|
// connection pool timeout, increase retries. #3289
|
||||||
|
Loading…
x
Reference in New Issue
Block a user