diff --git a/src/connection/websocket-manager.ts b/src/connection/websocket-manager.ts index b9597fe..caf2bad 100644 --- a/src/connection/websocket-manager.ts +++ b/src/connection/websocket-manager.ts @@ -181,7 +181,8 @@ export class WebSocketManager { } private attemptReconnect() { - if (this.reconnectCount < (this.options.reconnectAttempts || 3)) { + const maxAttempts = this.options.reconnectAttempts ?? 3; + if (this.reconnectCount < maxAttempts) { this.reconnectCount++; this.reconnectTimer = setTimeout(async () => { try {