Browse files

Retry if connection was reset by peer

  • Loading branch information...
1 parent 1edde7c commit 79d797fe74a757801c85b5ac595bc2532c6fb1c8 @orenhe orenhe committed Mar 22, 2013
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

0 comments on commit 79d797f

Please sign in to comment.