MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / shutdown

Function shutdown

src/mcp/proxy.ts:245–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243 try { process.stdout.write((typeof obj === 'string' ? obj : JSON.stringify(obj)) + '\n'); } catch { /* host gone */ }
244 };
245 const shutdown = (): void => {
246 if (shuttingDown) return; shuttingDown = true;
247 try { daemonSocket?.destroy(); } catch { /* ignore */ }
248 try { engine?.stop(); } catch { /* ignore */ }
249 process.exit(0);
250 };
251 const ensureEngine = (): Promise<void> => {
252 if (!engine) engine = deps.makeEngine();
253 if (!engineReady) engineReady = engine.ensureInitialized(deps.root).catch(() => { /* degraded */ });

Callers 1

runLocalHandshakeProxyFunction · 0.85

Calls 2

stopMethod · 0.65
destroyMethod · 0.45

Tested by

no test coverage detected