Fixes rescue block for refused connections, just for Net::HTTP

This commit is contained in:
Dave Yeu & Tim Gildea 2010-11-19 23:34:54 +08:00 committed by Erik Michaels-Ober
parent 87baca6cf5
commit cef0152af8

View File

@ -55,8 +55,8 @@ module Faraday
:body => http_resp.body
@app.call env
rescue Errno::ECONNREFUSED
raise Error::ConnectionFailed.new(Errno::ECONNREFUSED)
rescue Errno::ECONNREFUSED => e
raise Error::ConnectionFailed.new(e)
end
def net_http_class(env)