1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-25 08:21:55 +03:00

Merge pull request #2242 from go-redis/fix/pipeline-dial-retry

fix: retry dial errors from pipelines
This commit is contained in:
Vladimir Mihailenco
2022-10-11 09:53:01 +03:00
committed by GitHub

View File

@ -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 {
var err error
canRetry, err = p(ctx, cn, cmds)