mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-07-04 00:00:52 -04:00
Compare commits
3 Commits
aa825021a8
...
880583ab82
Author | SHA1 | Date | |
---|---|---|---|
|
880583ab82 | ||
|
b0b073db5c | ||
|
ca466780e7 |
@ -512,9 +512,14 @@ module HTTPX
|
||||
|
||||
def transition(nextstate)
|
||||
handle_transition(nextstate)
|
||||
rescue Errno::ECONNREFUSED,
|
||||
rescue Errno::ECONNABORTED,
|
||||
Errno::ECONNREFUSED,
|
||||
Errno::ECONNRESET,
|
||||
Errno::EADDRNOTAVAIL,
|
||||
Errno::EHOSTUNREACH,
|
||||
Errno::EINVAL,
|
||||
Errno::ENETUNREACH,
|
||||
Errno::EPIPE,
|
||||
TLSError => e
|
||||
# connect errors, exit gracefully
|
||||
handle_error(e)
|
||||
|
@ -28,7 +28,7 @@ module HTTPX
|
||||
nil
|
||||
when :half_open
|
||||
# return nothing or smth based on ratio
|
||||
return if Random::DEFAULT.rand >= @circuit_breaker_half_open_drip_rate
|
||||
return if Random.rand >= @circuit_breaker_half_open_drip_rate
|
||||
|
||||
@response
|
||||
when :open
|
||||
|
Loading…
x
Reference in New Issue
Block a user