()
| 279 | } |
| 280 | |
| 281 | async connect(): Promise<void> { |
| 282 | if (this.connected) return |
| 283 | if (this.connecting) return this.connecting |
| 284 | this.connecting = this.connectOnce() |
| 285 | try { |
| 286 | await this.connecting |
| 287 | } finally { |
| 288 | this.connecting = null |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | private async connectOnce(): Promise<void> { |
| 293 | await this.transport.connect() |
no test coverage detected