MCPcopy Create free account
hub / github.com/Noumena-Network/code / shutdown

Function shutdown

src/main.tsx:4160–4168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4158 });
4159 let shuttingDown = false;
4160 const shutdown = async () => {
4161 if (shuttingDown) return;
4162 shuttingDown = true;
4163 // Stop accepting new connections before tearing down sessions.
4164 server.stop(true);
4165 await sessionManager.destroyAll();
4166 await removeServerLock();
4167 process.exit(0);
4168 };
4169 process.once('SIGINT', () => void shutdown());
4170 process.once('SIGTERM', () => void shutdown());
4171 });

Callers 1

runFunction · 0.70

Calls 1

stopMethod · 0.80

Tested by

no test coverage detected