()
| 111 | } |
| 112 | |
| 113 | async connect(): Promise<void> { |
| 114 | if (this.socket?.readyState === WebSocket.OPEN) return |
| 115 | if (this.connecting) return this.connecting |
| 116 | |
| 117 | this.stopped = false |
| 118 | this.connecting = this.openLoop() |
| 119 | try { |
| 120 | await this.connecting |
| 121 | } finally { |
| 122 | this.connecting = null |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | private connectQuietly(): void { |
| 127 | void this.connect().catch(() => undefined) |
no test coverage detected