1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-23 16:25:34 +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

@ -51,7 +51,7 @@ func shouldRetry(err error, retryTimeout bool) bool {
switch err {
case io.EOF, io.ErrUnexpectedEOF:
return true
case nil, context.Canceled, context.DeadlineExceeded:
case nil, Nil, context.Canceled, context.DeadlineExceeded:
return false
case pool.ErrPoolTimeout:
// connection pool timeout, increase retries. #3289