Skip to content

Commit

Permalink
Fix websocket reconnection can get stuck in disconnected/connecting c…
Browse files Browse the repository at this point in the history
…ycle
  • Loading branch information
VeskeR committed Sep 6, 2024
1 parent ee76047 commit 61757f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/lib/transport/connectionmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1450,8 +1450,6 @@ class ConnectionManager extends EventEmitter {
if (transportPreference && transportPreference === this.baseTransport && this.webSocketTransportAvailable) {
this.checkWsConnectivity()
.then(() => {
this.wsCheckResult = true;
this.abandonedWebSocket = false;
this.unpersistTransportPreference();
if (this.state === this.states.connecting) {
Logger.logAction(
Expand Down Expand Up @@ -1493,6 +1491,8 @@ class ConnectionManager extends EventEmitter {
*/
connectWs(transportParams: TransportParams, connectCount: number) {
Logger.logAction(this.logger, Logger.LOG_MICRO, 'ConnectionManager.connectWs()');
this.wsCheckResult = null;
this.abandonedWebSocket = false;
this.startWebSocketSlowTimer();
this.startWebSocketGiveUpTimer(transportParams);

Expand Down

0 comments on commit 61757f9

Please sign in to comment.