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

Function teardown

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

Source from the content-addressed store, hash-verified

517 // an 'error' (ECONNRESET/hangup) rather than a clean close; destroying it
518 // stops a hung fd from busy-spinning the event loop (#799).
519 const teardown = () => {
520 try { process.stdin.destroy(); } catch { /* ignore */ }
521 try { socket.destroy(); } catch { /* ignore */ }
522 done();
523 };
524 process.stdin.on('close', teardown);
525 process.stdin.on('error', teardown);
526

Callers

nothing calls this directly

Calls 2

doneFunction · 0.85
destroyMethod · 0.45

Tested by

no test coverage detected