From 4bb485d04438669b23f93c64c69e5391f961b915 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Tue, 11 Oct 2022 09:38:10 +0300 Subject: [PATCH] fix: retry dial errors from pipelines --- redis.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)