From 43ced30f111567eddac8724d99bb1bd10fbbf2fb Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 10 Oct 2017 19:51:02 +0100 Subject: [PATCH] fs: Add more errors to retry - fixes #1733 --- fs/error.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/error.go b/fs/error.go index b81de2eda..d2a0e12f8 100644 --- a/fs/error.go +++ b/fs/error.go @@ -224,8 +224,10 @@ func Cause(cause error) (retriable bool, err error) { // This is incredibly ugly - if only errors.Cause worked for all // errors and all errors were exported from the stdlib. var retriableErrorStrings = []string{ - "use of closed network connection", // not exported :-( - "unexpected EOF reading trailer", + "use of closed network connection", // internal/poll/fd.go + "unexpected EOF reading trailer", // net/http/transfer.go + "transport connection broken", // net/http/transport.go + "http: ContentLength=", // net/http/transfer.go } // Errors which indicate networking errors which should be retried