diff --git a/redis.go b/redis.go index 04281493..54790a2d 100644 --- a/redis.go +++ b/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 { var err error canRetry, err = p(ctx, cn, cmds)