mirror of https://github.com/go-redis/redis.git
fix: retry dial errors from pipelines
This commit is contained in:
parent
1de0d2a1b7
commit
4bb485d044
3
redis.go
3
redis.go
|
@ -413,7 +413,8 @@ func (c *baseClient) _generalProcessPipeline(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var canRetry bool
|
// Enable retries by default to retry dial errors returned by withConn.
|
||||||
|
canRetry := true
|
||||||
lastErr = c.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
|
lastErr = c.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
|
||||||
var err error
|
var err error
|
||||||
canRetry, err = p(ctx, cn, cmds)
|
canRetry, err = p(ctx, cn, cmds)
|
||||||
|
|
Loading…
Reference in New Issue