diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-12-04 10:44:59 -0200 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-12-04 11:44:27 -0200 |
| commit | 4cd6553c9dc1d822a8abd4827388311d9beed9cf (patch) | |
| tree | e8e1e34d8705cd405328683f2fc470e6495ad0d3 | |
| parent | d57a62158a508c90ccd2812d5c0e0957eb6403a3 (diff) | |
| download | mullvadvpn-4cd6553c9dc1d822a8abd4827388311d9beed9cf.tar.xz mullvadvpn-4cd6553c9dc1d822a8abd4827388311d9beed9cf.zip | |
Remove reconnection loop guard
The guard was preventing legitimate reconnection requests from updating
the location.
| -rw-r--r-- | gui/packages/desktop/src/main/index.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gui/packages/desktop/src/main/index.js b/gui/packages/desktop/src/main/index.js index 0af3747330..e2542382e7 100644 --- a/gui/packages/desktop/src/main/index.js +++ b/gui/packages/desktop/src/main/index.js @@ -454,11 +454,9 @@ const ApplicationMain = { }, _setTunnelState(newState: TunnelStateTransition) { - const oldState = this._tunnelState; - this._tunnelState = newState; this._updateTrayIcon(newState.state); - this._updateLocation(oldState); + this._updateLocation(); if (!this._shouldSuppressNotifications()) { this._notificationController.notifyTunnelState(newState); @@ -619,15 +617,13 @@ const ApplicationMain = { return this._windowController && this._windowController.isVisible(); }, - async _updateLocation(oldState: TunnelStateTransition) { + async _updateLocation() { const newState = this._tunnelState; if ( newState.state === 'connected' || newState.state === 'disconnected' || - // Guard from fetching the location during reconnection loop. - (newState.state === 'connecting' && - !(oldState.state === 'disconnecting' && oldState.details === 'reconnect')) + newState.state === 'connecting' ) { try { // It may take some time to fetch the new user location. |
