summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 03a65ab88b..7343762564 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -1357,11 +1357,11 @@ module Net #:nodoc:
}
res
}
- rescue IOError, EOFError,
+ rescue Net::OpenTimeout
+ raise
+ rescue Net::ReadTimeout, IOError, EOFError,
Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
OpenSSL::SSL::SSLError, Timeout::Error => exception
- raise if Net::OpenTimeout === exception
-
if count == 0 && IDEMPOTENT_METHODS_.include?(req.method)
count += 1
@socket.close if @socket and not @socket.closed?