mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Update Apple / Global / Reject Hosts
This commit is contained in:
@@ -80,9 +80,9 @@ export function processHosts(span: Span, hostsUrl: string, mirrors: string[] | n
|
||||
// Avoid event loop starvation, so we wait for a macrotask before we start fetching.
|
||||
await Promise.resolve();
|
||||
|
||||
const filterRules = await childSpan.traceChild('download hosts').traceAsyncFn(() => {
|
||||
return fetchAssets(hostsUrl, mirrors).then(text => text.split('\n'));
|
||||
});
|
||||
const filterRules = await childSpan
|
||||
.traceChild('download hosts')
|
||||
.traceAsyncFn(() => fetchAssets(hostsUrl, mirrors).then(text => text.split('\n')));
|
||||
|
||||
childSpan.traceChild('parse hosts').traceSyncFn(() => {
|
||||
for (let i = 0, len = filterRules.length; i < len; i++) {
|
||||
|
||||
Reference in New Issue
Block a user