diff --git a/lib/aws/s3/connection.rb b/lib/aws/s3/connection.rb index dac8700..9aa7027 100644 --- a/lib/aws/s3/connection.rb +++ b/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, Errno::ECONNRESET + rescue Errno::EPIPE, Timeout::Error, Errno::EINVAL, EOFError, Errno::ECONNRESET, Errno::EHOSTUNREACH @http = create_connection attempts == 3 ? raise : (attempts += 1; retry) end