Compare commits

..

No commits in common. "880583ab825f0c0415ea9efb23d5ffe944ae7e83" and "aa825021a896fae6a3c01637fb7ded6af6999835" have entirely different histories.

2 changed files with 2 additions and 7 deletions

View File

@ -512,14 +512,9 @@ module HTTPX
def transition(nextstate) def transition(nextstate)
handle_transition(nextstate) handle_transition(nextstate)
rescue Errno::ECONNABORTED, rescue Errno::ECONNREFUSED,
Errno::ECONNREFUSED,
Errno::ECONNRESET,
Errno::EADDRNOTAVAIL, Errno::EADDRNOTAVAIL,
Errno::EHOSTUNREACH, Errno::EHOSTUNREACH,
Errno::EINVAL,
Errno::ENETUNREACH,
Errno::EPIPE,
TLSError => e TLSError => e
# connect errors, exit gracefully # connect errors, exit gracefully
handle_error(e) handle_error(e)

View File

@ -28,7 +28,7 @@ module HTTPX
nil nil
when :half_open when :half_open
# return nothing or smth based on ratio # return nothing or smth based on ratio
return if Random.rand >= @circuit_breaker_half_open_drip_rate return if Random::DEFAULT.rand >= @circuit_breaker_half_open_drip_rate
@response @response
when :open when :open