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

Function shutdown

src/main.tsx:4764–4772  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4762
4763 let shuttingDown = false;
4764 const shutdown = async () => {
4765 if (shuttingDown) return;
4766 shuttingDown = true;
4767 // Stop accepting new connections before tearing down sessions.
4768 server.stop(true);
4769 await sessionManager.destroyAll();
4770 await removeServerLock();
4771 process.exit(0);
4772 };
4773 process.once('SIGINT', () => void shutdown());
4774 process.once('SIGTERM', () => void shutdown());
4775 },

Callers 1

runFunction · 0.70

Calls 3

removeServerLockFunction · 0.85
destroyAllMethod · 0.80
stopMethod · 0.65

Tested by

no test coverage detected