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

Method joinPendingByDedupeKey

src/node/services/sshPromptService.ts:109–124  ·  view source on GitHub ↗
(dedupeKey: string)

Source from the content-addressed store, hash-verified

107 }
108
109 private joinPendingByDedupeKey(dedupeKey: string): Promise<SshPromptResolution> | undefined {
110 const existingId = this.inflightByDedupeKey.get(dedupeKey);
111 if (!existingId) {
112 return undefined;
113 }
114
115 const entry = this.pending.get(existingId);
116 if (!entry) {
117 this.inflightByDedupeKey.delete(dedupeKey);
118 return undefined;
119 }
120
121 return new Promise<SshPromptResolution>((resolve) => {
122 entry.waiters.push(resolve);
123 });
124 }
125
126 /**
127 * Called from SSH pool when a prompt is detected.

Callers 1

requestPromptDetailedMethod · 0.95

Calls 3

getMethod · 0.65
pushMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected