From 7f41639244ceeb9792120d92367d8ec77241ccee Mon Sep 17 00:00:00 2001 From: saltycrys <73420320+saltycrys@users.noreply.github.com> Date: Sun, 6 Dec 2020 05:05:25 +0100 Subject: [PATCH] Increase YouTube request timeout From 0.1 seconds to 2 seconds. The default timeout is five seconds (`QUICPool` in `src/invidious/helpers/utils.cr`) but it seems to have been chose randomly. If reads continue to time out the timeout can be increased again. --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 1a6a3bfa..c0606025 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -104,7 +104,7 @@ LOCALES = { "zh-TW" => load_locale("zh-TW"), } -YT_POOL = QUICPool.new(YT_URL, capacity: CONFIG.pool_size, timeout: 0.1) +YT_POOL = QUICPool.new(YT_URL, capacity: CONFIG.pool_size, timeout: 2) config = CONFIG logger = Invidious::LogHandler.new