Skip to content

Commit

Permalink
fix(db2/WithFallback): fallback on syscall.ECONNRESET
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangui-Bitfly committed Nov 29, 2024
1 parent 3e3f64d commit 0db781a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io"
"math/big"
"net/http"
"syscall"

"github.com/ethereum/go-ethereum/common/hexutil"

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 0db781a

Please sign in to comment.