A2C工单修复

This commit is contained in:
root
2026-07-03 20:12:20 +08:00
parent c3223f026e
commit 0f3eb53afe
21 changed files with 1561 additions and 172 deletions
+10 -8
View File
@@ -59,11 +59,12 @@ async function createBrowserSession(options = {}) {
page,
profile: 'real',
cleanup: async (destroy = false) => {
if (destroy || !sessionKey) {
try {
await browser.close();
} catch (_) { /* ignore */ }
if (!destroy) {
return;
}
try {
await browser.close();
} catch (_) { /* ignore */ }
},
};
}
@@ -74,11 +75,12 @@ async function createBrowserSession(options = {}) {
page: null,
profile: 'standard',
cleanup: async (destroy = false) => {
if (destroy || !sessionKey) {
try {
await browser.close();
} catch (_) { /* ignore */ }
if (!destroy) {
return;
}
try {
await browser.close();
} catch (_) { /* ignore */ }
},
};
}