diff --git a/backend/package.json b/backend/package.json index 1f268176..e71a2ea7 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.36.55", + "version": "2.36.56", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "packageManager": "pnpm@11.0.9", diff --git a/backend/src/vendor/open-api.js b/backend/src/vendor/open-api.js index 788abb9c..7166e5a3 100644 --- a/backend/src/vendor/open-api.js +++ b/backend/src/vendor/open-api.js @@ -482,7 +482,6 @@ export function HTTP(defaultOptions = { baseURL: '' }) { opts.body = body; opts.timeout = Number(opts.timeout) || 8000; - if (isNode) { const undici = eval("require('undici')"); const { socksDispatcher } = eval("require('fetch-socks')"); @@ -606,7 +605,7 @@ export function HTTP(defaultOptions = { baseURL: '' }) { reject(e); } } else { - if (isSurge || isStash || isShadowRocket) { + if (isSurge || isEgern || isStash || isShadowRocket) { opts.timeout = Math.ceil(opts.timeout / 1000); } @@ -719,9 +718,7 @@ export function HTTP(defaultOptions = { baseURL: '' }) { worker.then( async (value) => { // $.info(`🍉 [${requestId}] worker resolved`); - try { - await resolveOnce(value); - } catch (error) {} + await resolveOnce(value); }, (error) => { rejectOnce(error);