This commit is contained in:
Tommy D. Rossi
2025-11-21 23:15:55 +01:00
parent 75f9e6d79f
commit 7ae0891ec3
+1 -22
View File
@@ -415,28 +415,7 @@ server.tool(
async function main() {
const transport = new StdioServerTransport()
await server.connect(transport)
console.error('Playwright MCP server running on stdio')
// console.error('Playwright MCP server running on stdio')
}
async function cleanup() {
console.error('Shutting down MCP server...')
if (state.browser) {
try {
await state.browser.close()
} catch (e) {
// Ignore errors during browser close
}
}
process.exit(0)
}
// Handle process termination
process.on('SIGINT', cleanup)
process.on('SIGTERM', cleanup)
process.on('exit', () => {
// Browser cleanup is handled by the async cleanup function
})
main().catch(console.error)