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

Function retireEngine

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

Source from the content-addressed store, hash-verified

367 // Stop the in-process engine once the calls it is serving have answered.
368 // Stopping it releases the writer lock if it held one.
369 const retireEngine = async (): Promise<void> => {
370 const retired = engine;
371 engine = null;
372 engineReady = null;
373 if (retired) retiring.add(retired);
374 try {
375 await Promise.allSettled([...localCalls]);
376 try { await retired?.stop(); } catch { /* best-effort */ }
377 } finally {
378 if (retired) retiring.delete(retired);
379 }
380 };
381 // Daemon-unavailable fallback: serve a client message in-process.
382 const handleLocally = (line: string): Promise<void> => {
383 const call = serveLocally(line);

Callers 1

retryDaemonFunction · 0.85

Calls 3

stopMethod · 0.65
deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected