From 7255d93b08909a0117840083322dc27d5568c423 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Apr 2012 13:48:31 +0000 Subject: deal with timeout exceptions * lib/net/http.rb (Net::HTTP#transport_request): deal with Net::OpenTimeout and Net::ReadTimeout first to get rid of loading OpenSSL as possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/net') 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? -- cgit v1.2.3