mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
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:
parent
c7490e8493
commit
0b871e6546
@ -194,6 +194,7 @@ async function fetchPatchDetailsFromCDNs(assetDetails) {
|
|||||||
console.error(reason);
|
console.error(reason);
|
||||||
});
|
});
|
||||||
if ( response === undefined ) { continue; }
|
if ( response === undefined ) { continue; }
|
||||||
|
if ( response.status === 404 ) { break; }
|
||||||
if ( response.ok !== true ) { continue; }
|
if ( response.ok !== true ) { continue; }
|
||||||
const patchText = await response.text();
|
const patchText = await response.text();
|
||||||
const patchDetails = parsePatch(patchText);
|
const patchDetails = parsePatch(patchText);
|
||||||
|
Loading…
Reference in New Issue
Block a user