gearheads
/
mastodon
Archived
2
0
Fork 0

Fix incorrect connect timeout in outgoing requests (#26116)

gh/stable
Claire 2023-07-22 20:42:31 +02:00
parent 2461ffbff9
commit eace7f9fcf
1 changed files with 2 additions and 2 deletions

View File

@ -285,11 +285,11 @@ class Request
end end
until socks.empty? until socks.empty?
_, available_socks, = IO.select(nil, socks, nil, Request::TIMEOUT[:connect]) _, available_socks, = IO.select(nil, socks, nil, Request::TIMEOUT[:connect_timeout])
if available_socks.nil? if available_socks.nil?
socks.each(&:close) socks.each(&:close)
raise HTTP::TimeoutError, "Connect timed out after #{Request::TIMEOUT[:connect]} seconds" raise HTTP::TimeoutError, "Connect timed out after #{Request::TIMEOUT[:connect_timeout]} seconds"
end end
available_socks.each do |sock| available_socks.each do |sock|