()
| 313 | } |
| 314 | |
| 315 | private scheduleReconnect(): void { |
| 316 | if (this.reconnectAttempts >= this.maxReconnectAttempts) return; |
| 317 | const delay = this.baseDelay * Math.pow(2, this.reconnectAttempts); |
| 318 | this.reconnectAttempts++; |
| 319 | this.reconnectTimer = setTimeout(() => this.connect(this.wsUrl), delay); |
| 320 | } |
| 321 | } |