Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Retry if connection was reset by peer (ECONNRESET)

This error tends to happen here and there, and deserves similar retry treatment as other Net:HTTP errors.
  • Loading branch information...
commit c2fcbd6e77ec61d0caeb4202ae3d0ff2c624cfb5 1 parent 1edde7c
@orenhe authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/aws/s3/connection.rb
View
2  lib/aws/s3/connection.rb
@@ -51,7 +51,7 @@ def request(verb, path, headers = {}, body = nil, attempts = 0, &block)
else
http.start(&requester)
end
- rescue Errno::EPIPE, Timeout::Error, Errno::EINVAL, EOFError
+ rescue Errno::EPIPE, Timeout::Error, Errno::EINVAL, EOFError, Errno::ECONNRESET
@http = create_connection
attempts == 3 ? raise : (attempts += 1; retry)
end
Please sign in to comment.
Something went wrong with that request. Please try again.