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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user