MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / shutdown

Function shutdown

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

stopMethod · 0.65
destroyMethod · 0.45

Tested by

no test coverage detected