A2C工单修复
This commit is contained in:
@@ -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 */ }
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user