mirror of
https://github.com/iv-org/invidious
synced 2024-11-24 03:53:27 +01:00
Bump read timeout
This commit is contained in:
parent
0f3c477ff3
commit
13e7cca1a4
@ -1619,8 +1619,8 @@ struct HTTPPool
|
|||||||
rescue ex
|
rescue ex
|
||||||
conn = HTTPClient.new(url)
|
conn = HTTPClient.new(url)
|
||||||
conn.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
|
conn.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
|
||||||
conn.read_timeout = 5.seconds
|
conn.read_timeout = 10.seconds
|
||||||
conn.connect_timeout = 5.seconds
|
conn.connect_timeout = 10.seconds
|
||||||
yield conn
|
yield conn
|
||||||
ensure
|
ensure
|
||||||
pool.checkin(conn)
|
pool.checkin(conn)
|
||||||
@ -1631,8 +1631,8 @@ struct HTTPPool
|
|||||||
ConnectionPool(HTTPClient).new(capacity: capacity, timeout: timeout) do
|
ConnectionPool(HTTPClient).new(capacity: capacity, timeout: timeout) do
|
||||||
client = HTTPClient.new(url)
|
client = HTTPClient.new(url)
|
||||||
client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
|
client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
|
||||||
client.read_timeout = 5.seconds
|
client.read_timeout = 10.seconds
|
||||||
client.connect_timeout = 5.seconds
|
client.connect_timeout = 10.seconds
|
||||||
client
|
client
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1661,8 +1661,8 @@ end
|
|||||||
def make_client(url : URI, region = nil)
|
def make_client(url : URI, region = nil)
|
||||||
client = HTTPClient.new(url)
|
client = HTTPClient.new(url)
|
||||||
client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
|
client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
|
||||||
client.read_timeout = 5.seconds
|
client.read_timeout = 10.seconds
|
||||||
client.connect_timeout = 5.seconds
|
client.connect_timeout = 10.seconds
|
||||||
|
|
||||||
if region
|
if region
|
||||||
PROXY_LIST[region]?.try &.sample(40).each do |proxy|
|
PROXY_LIST[region]?.try &.sample(40).each do |proxy|
|
||||||
|
Loading…
Reference in New Issue
Block a user