From 0b871e6546421527b63880255a4c37a51c526178 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 14 Nov 2023 17:39:48 -0500 Subject: [PATCH] If response is 404, skip trying other CDNs When there is a 404 response, in all likelihood other CDNs will also return 404, no point pointlessly fetching from others. --- src/js/diff-updater.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/diff-updater.js b/src/js/diff-updater.js index 87da6f4d6..ba91ddef3 100644 --- a/src/js/diff-updater.js +++ b/src/js/diff-updater.js @@ -194,6 +194,7 @@ async function fetchPatchDetailsFromCDNs(assetDetails) { console.error(reason); }); if ( response === undefined ) { continue; } + if ( response.status === 404 ) { break; } if ( response.ok !== true ) { continue; } const patchText = await response.text(); const patchDetails = parsePatch(patchText);