1
0
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:
Monkey
2025-03-14 16:05:22 +08:00
committed by ofekshenawa
parent f3979d7144
commit 28d0d08ce4
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 {