MCPcopy
hub / github.com/coder/mux / finalizeRequest

Method finalizeRequest

src/node/services/sshPromptService.ts:91–107  ·  view source on GitHub ↗
(requestId: string, resolution: SshPromptResolution)

Source from the content-addressed store, hash-verified

89
90 // NOTE: `resolution.response` may contain credentials. Never log response values.
91 private finalizeRequest(requestId: string, resolution: SshPromptResolution): void {
92 const entry = this.pending.get(requestId);
93 if (!entry) {
94 return;
95 }
96
97 clearTimeout(entry.timer);
98 this.pending.delete(requestId);
99 if (entry.dedupeKey) {
100 this.inflightByDedupeKey.delete(entry.dedupeKey);
101 }
102 this.emit("removed", requestId);
103
104 for (const resolve of entry.waiters) {
105 resolve(resolution);
106 }
107 }
108
109 private joinPendingByDedupeKey(dedupeKey: string): Promise<SshPromptResolution> | undefined {
110 const existingId = this.inflightByDedupeKey.get(dedupeKey);

Callers 2

requestPromptDetailedMethod · 0.95
respondMethod · 0.95

Calls 4

resolveFunction · 0.70
getMethod · 0.65
emitMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected