diff --git a/lib/socket/socket.react.js b/lib/socket/socket.react.js --- a/lib/socket/socket.react.js +++ b/lib/socket/socket.react.js @@ -123,7 +123,7 @@ messageLastReceived: ?number; reopenConnectionAfterClosing: boolean = false; initializedWithUserState: ?PreRequestUserState; - failuresAfterPolicyAcknowledgment: number = 0; + initFailureCountAfterPolicyAcknowledgment: number = 0; openSocket(newStatus: ConnectionStatus) { if ( @@ -436,7 +436,7 @@ if (!message) { return; } - this.failuresAfterPolicyAcknowledgment = 0; + this.initFailureCountAfterPolicyAcknowledgment = 0; const { inflightRequests } = this.state; if (!inflightRequests) { @@ -677,12 +677,12 @@ await this.sendInitialMessage(); } catch (e) { if (this.props.noDataAfterPolicyAcknowledgment) { - this.failuresAfterPolicyAcknowledgment++; + this.initFailureCountAfterPolicyAcknowledgment++; } else { - this.failuresAfterPolicyAcknowledgment = 0; + this.initFailureCountAfterPolicyAcknowledgment = 0; } - if (this.failuresAfterPolicyAcknowledgment >= 2) { - this.failuresAfterPolicyAcknowledgment = 0; + if (this.initFailureCountAfterPolicyAcknowledgment >= 2) { + this.initFailureCountAfterPolicyAcknowledgment = 0; this.props.showSocketCrashLoopAlert?.(); this.props.dispatch({ type: setActiveSessionRecoveryActionType,