* Fail any in-flight server-initiated requests so their awaiters don't hang. * Called from `stop()` in subclasses.
(reason: string)
| 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. |