aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-02-18 21:23:00 -0500
committerAjay Ramachandran <[email protected]>2021-02-24 21:08:54 -0500
commit383fe59bc0dc088ed490520a2dbf50a15ec4b5f5 (patch)
treed75c09c61302c7d9e2147cc8e2f93fedf6b73534
parent27fe2ca8f075a855df1457085c5cfa342d5c67a6 (diff)
downloadSponsorBlock-383fe59bc0dc088ed490520a2dbf50a15ec4b5f5.tar.gz
SponsorBlock-383fe59bc0dc088ed490520a2dbf50a15ec4b5f5.zip
Lower retry frequency
(cherry picked from commit 3927fe5630984d86793be55a55db8ee269f27986)
-rw-r--r--src/content.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts
index e6e87704..42627dea 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -647,12 +647,12 @@ async function sponsorsLookup(id: string) {
sponsorLookupRetries = 0;
} else if (response?.status === 404) {
retryFetch(id);
- } else if (sponsorLookupRetries < 90 && !recheckStarted) {
+ } else if (sponsorLookupRetries < 15 && !recheckStarted) {
recheckStarted = true;
//TODO lower when server becomes better (back to 1 second)
//some error occurred, try again in a second
- setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000);
+ setTimeout(() => sponsorsLookup(id), 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries);
sponsorLookupRetries++;
}