chore(extension): exit gracefully when waiting for extension connection (#754)
This commit is contained in:
parent
e0fb748ccc
commit
e153ac3b7c
4 changed files with 21 additions and 16 deletions
|
|
@ -17,6 +17,7 @@
|
|||
import debug from 'debug';
|
||||
import * as playwright from 'playwright';
|
||||
|
||||
import { logUnhandledError } from './log.js';
|
||||
import { Tab } from './tab.js';
|
||||
|
||||
import type { Tool } from './tools/tool.js';
|
||||
|
|
@ -140,7 +141,7 @@ export class Context {
|
|||
|
||||
async closeBrowserContext() {
|
||||
if (!this._closeBrowserContextPromise)
|
||||
this._closeBrowserContextPromise = this._closeBrowserContextImpl();
|
||||
this._closeBrowserContextPromise = this._closeBrowserContextImpl().catch(logUnhandledError);
|
||||
await this._closeBrowserContextPromise;
|
||||
this._closeBrowserContextPromise = undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue