()
| 459 | } |
| 460 | |
| 461 | async close(): Promise<void> { |
| 462 | this.closed = true; |
| 463 | const activeClient = this.client; |
| 464 | this.client = null; |
| 465 | this.repoKey = null; |
| 466 | this.questionKey = null; |
| 467 | |
| 468 | if (this.connecting) { |
| 469 | await this.connecting.catch(() => undefined); |
| 470 | } |
| 471 | |
| 472 | const connectedClient = activeClient ?? this.client; |
| 473 | this.client = null; |
| 474 | if (connectedClient && connectedClient !== activeClient) { |
| 475 | await connectedClient.close(); |
| 476 | } |
| 477 | if (activeClient) { |
| 478 | await activeClient.close(); |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | const normalizeTag = (v: string): string => v.trim(); |
no outgoing calls
no test coverage detected