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

Function rejectPending

src/mcp/transport.ts:152–157  ·  view source on GitHub ↗

* Fail any in-flight server-initiated requests so their awaiters don't hang. * Called from `stop()` in subclasses.

(reason: string)

Source from the content-addressed store, hash-verified

150 * Called from `stop()` in subclasses.
151 */
152 protected rejectPending(reason: string): void {
153 for (const { reject } of this.pending.values()) {
154 reject(new Error(reason));
155 }
156 this.pending.clear();
157 }
158
159 /**
160 * Handle an incoming line of JSON. Both transports feed lines here.

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected