From 534ce77b694503811b21e5846937f09d04363a9d Mon Sep 17 00:00:00 2001 From: Joshua Sierles Date: Fri, 6 Aug 2010 14:43:24 +0200 Subject: [PATCH] retry on socket errors as well --- lib/aws/s3/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aws/s3/connection.rb b/lib/aws/s3/connection.rb index 766abb8..85dee2d 100644 --- a/lib/aws/s3/connection.rb +++ b/lib/aws/s3/connection.rb @@ -53,7 +53,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, SocketError @http = create_connection attempts == 3 ? raise : (attempts += 1; retry) end