forked from mirror/redis
Merge pull request #2242 from go-redis/fix/pipeline-dial-retry
fix: retry dial errors from pipelines
This commit is contained in:
commit
3676fa2a1f
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