MCPcopy Index your code
hub / github.com/codeaashu/claude-code / shutdown

Function shutdown

src/server/web/pty-server.ts:289–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

287// ── Graceful shutdown ─────────────────────────────────────────────────────────
288
289function shutdown() {
290 console.log("Shutting down...");
291 clearInterval(rateLimiterCleanup);
292 sessionManager.destroyAll();
293 wss.close(() => {
294 server.close(() => {
295 console.log("Server closed.");
296 process.exit(0);
297 });
298 });
299
300 setTimeout(() => {
301 console.error("Forced shutdown after timeout");
302 process.exit(1);
303 }, 10_000);
304}
305
306process.on("SIGTERM", shutdown);
307process.on("SIGINT", shutdown);

Callers

nothing calls this directly

Calls 3

destroyAllMethod · 0.45
closeMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected