From 9bcee6afce5596c1f67a91771ac8cfb14c299d4d Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 20 Jan 2022 16:03:41 -0500 Subject: [PATCH] Remove 502 retry logic --- src/content.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/content.ts b/src/content.ts index 37c3812a..1bc135e5 100644 --- a/src/content.ts +++ b/src/content.ts @@ -682,9 +682,6 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { setupVideoMutationListener(); - //check database for sponsor times - //made true once a setTimeout has been created to try again after a server error - let recheckStarted = false; // Create categories list const categories: string[] = []; for (const categorySelection of Config.config.categorySelections) { @@ -763,18 +760,6 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { sponsorLookupRetries = 0; } else if (response?.status === 404) { retryFetch(); - } 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(() => { - if (sponsorVideoID && sponsorTimes?.length === 0) { - sponsorsLookup(sponsorVideoID); - } - }, 5000 + Math.random() * 15000 + 5000 * sponsorLookupRetries); - - sponsorLookupRetries++; } lookupVipInformation(id);