From c43e7120ec8633ea0a3227e250cb7bf1947e9e7f Mon Sep 17 00:00:00 2001 From: ashley Date: Tue, 23 Sep 2025 22:17:13 +0200 Subject: [PATCH] Update src/libpoketube/libpoketube-core.js --- src/libpoketube/libpoketube-core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 15b5bfcd..e1504a86 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -59,9 +59,9 @@ class InnerTubePokeVidious { "User-Agent": this.useragent, }; -// Retries only within a 5s window that starts AFTER the first 500/502. +// Retries only within a 8s window that starts AFTER the first 500/502. // Fast path: one plain fetch with no extra timers/signals unless 500/502 occurs. -const fetchWithRetry = async (url, options = {}, maxRetryTime = 5000) => { +const fetchWithRetry = async (url, options = {}, maxRetryTime = 8000) => { let lastError; // Trigger statuses that arm the retry window @@ -157,7 +157,7 @@ const fetchWithRetry = async (url, options = {}, maxRetryTime = 5000) => { // Optional short stagger before the first retry to reduce herd effects // await sleep(50 + ((Math.random() * 150) | 0)); - // Retry loop within the 5s window + // Retry loop within the 8s window while (true) { const elapsed = Date.now() - retryStart; const remaining = maxRetryTime - elapsed;