From 145e0b101f67bbca05f2268e03739f7960c489ba Mon Sep 17 00:00:00 2001 From: shuangkun Date: Mon, 9 Sep 2024 22:16:21 +0800 Subject: [PATCH] fix: add retry for invalid connection. Signed-off-by: shuangkun --- util/errors/errors.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/errors/errors.go b/util/errors/errors.go index 2982be216fd7..6a626192aeb6 100644 --- a/util/errors/errors.go +++ b/util/errors/errors.go @@ -112,6 +112,9 @@ func isTransientNetworkErr(err error) bool { } else if strings.Contains(errorString, "connect: connection refused") { // If err is connection refused, retry. return true + } else if strings.Contains(errorString, "invalid connection") { + // If err is invalid connection, retry. + return true } return false