Retry errors which indicate the connection closed prematurely.
See discussion in #442
This commit is contained in:
parent
5c2d8ffe33
commit
1752ee3c8b
4 changed files with 64 additions and 4 deletions
|
@ -142,9 +142,6 @@ var retryErrorCodes = []int{
|
|||
// shouldRetry returns a boolean as to whether this resp and err
|
||||
// deserve to be retried. It returns the err as a convenience
|
||||
func shouldRetry(resp *http.Response, err error) (bool, error) {
|
||||
if err == io.EOF {
|
||||
return true, err
|
||||
}
|
||||
return fs.ShouldRetry(err) || fs.ShouldRetryHTTP(resp, retryErrorCodes), err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue