1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-07 12:42:55 +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

@@ -11,6 +11,8 @@ import (
"github.com/redis/go-redis/v9/internal/pool"
)
var ErrPoolTimeout = pool.ErrPoolTimeout
func (c *baseClient) Pool() pool.Pooler {
return c.connPool
}
@@ -102,3 +104,7 @@ func (c *Ring) ShardByName(name string) *ringShard {
func (c *ModuleLoadexConfig) ToArgs() []interface{} {
return c.toArgs()
}
func ShouldRetry(err error, retryTimeout bool) bool {
return shouldRetry(err, retryTimeout)
}