From 0db781acd7cfbbe9b824a059774a086b323ddb51 Mon Sep 17 00:00:00 2001 From: Tangui Clairet <181825613+Tangui-Bitfly@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:28:06 +0100 Subject: [PATCH] fix(db2/WithFallback): fallback on syscall.ECONNRESET --- db2/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db2/client.go b/db2/client.go index b2c4b6814a..48d2263f43 100644 --- a/db2/client.go +++ b/db2/client.go @@ -9,6 +9,7 @@ import ( "io" "math/big" "net/http" + "syscall" "github.com/ethereum/go-ethereum/common/hexutil" @@ -47,7 +48,8 @@ func (r WithFallback) RoundTrip(request *http.Request) (*http.Response, error) { if !errors.As(err, &e1) && !errors.Is(err, ErrNotFoundInCache) && !errors.Is(err, ErrMethodNotSupported) && - !errors.Is(err, store.ErrNotFound) { + !errors.Is(err, store.ErrNotFound) && + !errors.Is(err, syscall.ECONNRESET) { return nil, err }