MCPcopy
hub / github.com/browserbase/mcp-server-browserbase / handleExit

Function handleExit

src/program.ts:80–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79function setupExitWatchdog(serverList: ServerList) {
80 const handleExit = async () => {
81 setTimeout(() => process.exit(0), 15000);
82 try {
83 // SessionManager within each server handles session cleanup
84 await serverList.closeAll();
85 } catch (error) {
86 console.error("Error during cleanup:", error);
87 }
88 process.exit(0);
89 };
90
91 process.stdin.on("close", handleExit);
92 process.on("SIGINT", handleExit);

Callers

nothing calls this directly

Calls 1

closeAllMethod · 0.80

Tested by

no test coverage detected