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.
This commit is contained in:
Raymond Hill 2023-11-14 17:39:48 -05:00
parent c7490e8493
commit 0b871e6546
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 0 deletions

View File

@ -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);