Rescue IOError rather than EOFError to cover more exceptions
This commit is contained in:
Mattia Giuffrida 2016-11-22 12:14:50 +00:00
parent a7f4a5a4b5
commit 3e0feb2f1b
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ module Faraday
else
raise Faraday::Error::ClientError, $!
end
rescue Errno::ECONNREFUSED, EOFError
rescue Errno::ECONNREFUSED, IOError
raise Faraday::Error::ConnectionFailed, $!
rescue => err
if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err

View File

@ -10,7 +10,7 @@ module Faraday
class Adapter
class NetHttp < Faraday::Adapter
NET_HTTP_EXCEPTIONS = [
EOFError,
IOError,
Errno::ECONNABORTED,
Errno::ECONNREFUSED,
Errno::ECONNRESET,