lib/ezclient/request.rb in ezclient-0.7.0 vs lib/ezclient/request.rb in ezclient-0.8.0
- old
+ new
@@ -91,10 +91,11 @@
def retry_on_connection_error
# This may result in 2 requests reaching the server so I hope HTTP fixes it
# https://github.com/httprb/http/issues/459
yield
- rescue HTTP::ConnectionError
+ rescue HTTP::ConnectionError => error
+ raise unless error.message == "couldn't read response headers"
yield
end
def timeout
options[:timeout]&.to_f