chore(extension): reject second http connection (#766)

This commit is contained in:
Yury Semikhatsky
2025-07-25 14:46:48 -07:00
committed by GitHub
parent 6710a78641
commit dbf113d5e4
4 changed files with 34 additions and 3 deletions

View File

@@ -30,6 +30,8 @@ import type { Tool } from './tools/tool.js';
export class BrowserServerBackend implements ServerBackend {
name = 'Playwright';
version = packageJSON.version;
onclose?: () => void;
private _tools: Tool[];
private _context: Context;
private _sessionLog: SessionLog | undefined;
@@ -61,6 +63,7 @@ export class BrowserServerBackend implements ServerBackend {
}
serverClosed() {
this.onclose?.();
void this._context.dispose().catch(logUnhandledError);
}
}