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

Function shutdown

src/main.tsx:4026–4034  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4024 });
4025 let shuttingDown = false;
4026 const shutdown = async () => {
4027 if (shuttingDown) return;
4028 shuttingDown = true;
4029 // Stop accepting new connections before tearing down sessions.
4030 server.stop(true);
4031 await sessionManager.destroyAll();
4032 await removeServerLock();
4033 process.exit(0);
4034 };
4035 process.once('SIGINT', () => void shutdown());
4036 process.once('SIGTERM', () => void shutdown());
4037 });

Callers 1

runFunction · 0.70

Calls 2

stopMethod · 0.65
destroyAllMethod · 0.45

Tested by

no test coverage detected