mirror of
https://github.com/redis/go-redis.git
synced 2025-09-05 20:24:00 +03:00
fix: connection pool timeout, increase retries (#3298)
* fix: connection pool timeout, increase retries Signed-off-by: monkey <golang@88.com> * fix: add shouldRetry test Signed-off-by: monkey <golang@88.com> --------- Signed-off-by: monkey <golang@88.com> Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
This commit is contained in:
3
error.go
3
error.go
@@ -53,6 +53,9 @@ func shouldRetry(err error, retryTimeout bool) bool {
|
||||
return true
|
||||
case nil, context.Canceled, context.DeadlineExceeded:
|
||||
return false
|
||||
case pool.ErrPoolTimeout:
|
||||
// connection pool timeout, increase retries. #3289
|
||||
return true
|
||||
}
|
||||
|
||||
if v, ok := err.(timeoutError); ok {
|
||||
|
Reference in New Issue
Block a user