Permalink
Browse files

Merge pull request #712 from RickCSong/master

Patch raise_timeout_error for HTTP.rb adapter to return proper error
  • Loading branch information...
2 parents 135a444 + cad21c8 commit 9c035da918da4f2890407fd44d4e66bdd9b855de @bblimke committed on GitHub Aug 3, 2017
@@ -43,7 +43,7 @@ def replay
def raise_timeout_error
raise Errno::ETIMEDOUT if HTTP::VERSION < "1.0.0"
- raise HTTP::ConnectionError, "connection error: #{Errno::ETIMEDOUT.new}"
+ raise HTTP::TimeoutError, "connection error: #{Errno::ETIMEDOUT.new}"
end
def perform
@@ -20,7 +20,7 @@ def http_request(method, uri, options = {})
def client_timeout_exception_class
return Errno::ETIMEDOUT if HTTP::VERSION < "1.0.0"
- HTTP::ConnectionError
+ HTTP::TimeoutError
end
def connection_refused_exception_class

0 comments on commit 9c035da

Please sign in to comment.