()
| 264 | } |
| 265 | |
| 266 | disconnect(): void { |
| 267 | // Set max attempts to prevent reconnect |
| 268 | this.reconnectAttempts = this.maxReconnectAttempts; |
| 269 | if (this.reconnectTimer) { |
| 270 | clearTimeout(this.reconnectTimer); |
| 271 | this.reconnectTimer = null; |
| 272 | } |
| 273 | this.stopPing(); |
| 274 | this.ws?.close(); |
| 275 | this.ws = null; |
| 276 | } |
| 277 | |
| 278 | send(event: OutgoingEvent): void { |
| 279 | if (this.ws?.readyState !== WebSocket.OPEN) return; |
no test coverage detected