1
0
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:
Nedyalko Dyakov 2025-03-26 18:05:04 +02:00
parent cb3aa19618
commit 625a6f2a75
No known key found for this signature in database
GPG Key ID: 5571106A08EA25A3

View File

@ -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