diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-11-22 20:12:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 20:12:04 +0100 |
commit | fd8145d2322d8b13b6aaa9cd2a61331ff660c9dd (patch) | |
tree | 7466262da5fde059add6d1779df2ed4db57f11e8 /app/serializers/initial_state_serializer.rb | |
parent | 824497fbced31cb293fa1baee96105c666e34916 (diff) |
Fix connect timeout not being enforced (#9329)
* Fix connect timeout not being enforced The loop was catching the timeout exception that should stop execution, so the next IP would no longer be within a timed block, which led to requests taking much longer than 10 seconds. * Use timeout on each IP attempt, but limit to 2 attempts * Fix code style issue * Do not break Request#perform if no block given * Update method stub in spec for Request * Move timeout inside the begin/rescue block * Use Resolv::DNS with timeout of 1 to get IP addresses * Update Request spec to stub Resolv::DNS instead of Addrinfo * Fix Resolve::DNS stubs in Request spec
Diffstat (limited to 'app/serializers/initial_state_serializer.rb')
0 files changed, 0 insertions, 0 deletions