* Force reconnect - closes existing connection and establishes a new one. * Useful when the subscription becomes stale (e.g., after container shutdown).
()
| 391 | * Useful when the subscription becomes stale (e.g., after container shutdown). |
| 392 | */ |
| 393 | reconnect(): void { |
| 394 | logForDebugging('[SessionsWebSocket] Force reconnecting') |
| 395 | this.reconnectAttempts = 0 |
| 396 | this.sessionNotFoundRetries = 0 |
| 397 | this.close() |
| 398 | // Small delay before reconnecting (stored in reconnectTimer so it can be cancelled) |
| 399 | this.reconnectTimer = setTimeout(() => { |
| 400 | this.reconnectTimer = null |
| 401 | void this.connect() |
| 402 | }, 500) |
| 403 | } |
| 404 | } |
| 405 |
nothing calls this directly
no test coverage detected