chore: ping client and disconnect on connection termination (#764)
This commit is contained in:
@@ -46,7 +46,7 @@ export class Context {
|
||||
static async create(config: FullConfig) {
|
||||
const client = new Client({ name: 'Playwright Proxy', version: '1.0.0' });
|
||||
const browserContextFactory = contextFactory(config.browser);
|
||||
const server = mcpServer.createServer(new BrowserServerBackend(config, browserContextFactory));
|
||||
const server = mcpServer.createServer(new BrowserServerBackend(config, browserContextFactory), false);
|
||||
await client.connect(new InProcessTransport(server));
|
||||
await client.ping();
|
||||
return new Context(config, client);
|
||||
|
||||
Reference in New Issue
Block a user