1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +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:
Monkey
2025-03-14 16:05:22 +08:00
committed by GitHub
parent 1c9309fdc2
commit 4f09082f6b
3 changed files with 74 additions and 0 deletions

View File

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