From 4d7ec61f8ff1f68c7ca15d0bf062da69ce738811 Mon Sep 17 00:00:00 2001 From: Jon Johnson Date: Fri, 22 Jul 2022 13:41:06 -0700 Subject: [PATCH] Retry ECONNRESET errors We see this often as "connection reset by peer" errors. Not a lot we can do about this beyond retrying. --- pkg/v1/remote/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/remote/options.go b/pkg/v1/remote/options.go index 8bfd06d78..c2b6b7e1e 100644 --- a/pkg/v1/remote/options.go +++ b/pkg/v1/remote/options.go @@ -59,7 +59,7 @@ type Backoff = retry.Backoff var defaultRetryPredicate retry.Predicate = func(err error) bool { // Various failure modes here, as we're often reading from and writing to // the network. - if retry.IsTemporary(err) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) || errors.Is(err, syscall.EPIPE) { + if retry.IsTemporary(err) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) || errors.Is(err, syscall.EPIPE) || errors.Is(err, syscall.ECONNRESET) { logs.Warn.Printf("retrying %v", err) return true }