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

Function fire

src/mcp/stdin-teardown.ts:31–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29): void {
30 let fired = false;
31 const fire = (): void => {
32 if (fired) return;
33 fired = true;
34 // Drop the fd from epoll so a hung/half-closed socket can't keep waking
35 // the loop. Best-effort: the stream may already be torn down.
36 try {
37 (stream as Partial<{ destroy(): void }>).destroy?.();
38 } catch {
39 /* already gone */
40 }
41 onTerminal();
42 };
43 stream.on('end', fire);
44 stream.on('close', fire);
45 stream.on('error', fire);

Callers

nothing calls this directly

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected