diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-10-28 12:34:50 -0400 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-10-28 12:34:50 -0400 |
| commit | 13e7cca1a4b3999188201c242aa50f412426b833 (patch) | |
| tree | 6f26d277a1e52787cd78ceeb4115d2643af93e16 | |
| parent | 0f3c477ff34238733417357ab11f6a4dfb8db28f (diff) | |
| download | invidious-13e7cca1a4b3999188201c242aa50f412426b833.tar.gz invidious-13e7cca1a4b3999188201c242aa50f412426b833.tar.bz2 invidious-13e7cca1a4b3999188201c242aa50f412426b833.zip | |
Bump read timeout
| -rw-r--r-- | src/invidious/helpers/utils.cr | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index 7dd1adf3..4bf2031e 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -1619,8 +1619,8 @@ struct HTTPPool rescue ex conn = HTTPClient.new(url) conn.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC - conn.read_timeout = 5.seconds - conn.connect_timeout = 5.seconds + conn.read_timeout = 10.seconds + conn.connect_timeout = 10.seconds yield conn ensure pool.checkin(conn) @@ -1631,8 +1631,8 @@ struct HTTPPool ConnectionPool(HTTPClient).new(capacity: capacity, timeout: timeout) do client = HTTPClient.new(url) client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC - client.read_timeout = 5.seconds - client.connect_timeout = 5.seconds + client.read_timeout = 10.seconds + client.connect_timeout = 10.seconds client end end @@ -1661,8 +1661,8 @@ end def make_client(url : URI, region = nil) client = HTTPClient.new(url) client.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC - client.read_timeout = 5.seconds - client.connect_timeout = 5.seconds + client.read_timeout = 10.seconds + client.connect_timeout = 10.seconds if region PROXY_LIST[region]?.try &.sample(40).each do |proxy| |
