(dedupeKey: string)
| 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. |
no test coverage detected