1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-28 06:48:38 +09:00

Fix incorrect connect timeout in outgoing requests (#26116)

This commit is contained in:
Claire 2023-07-22 20:42:31 +02:00 committed by GitHub
parent f2c683336b
commit 0078e7e760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,11 +284,11 @@ class Request
end
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?
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
available_socks.each do |sock|