summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-12-20 16:11:46 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-12-20 16:11:46 +0100
commit2fcc111edbf46535f727d9c3bc60100d91afac14 (patch)
treeefde4902fb2be445d648bc7654d2b7928ca43496
parentf186703c992f017f12fb1fb9e6cff3dcce166599 (diff)
parentd6523545c8ee64efed50f57556d78cb9dc8503f3 (diff)
downloadmullvadvpn-2fcc111edbf46535f727d9c3bc60100d91afac14.tar.xz
mullvadvpn-2fcc111edbf46535f727d9c3bc60100d91afac14.zip
Merge branch 'fix-state-indication-when-disconnecting-state'
-rw-r--r--gui/packages/desktop/src/main/index.js19
-rw-r--r--gui/packages/desktop/src/renderer/app.js3
2 files changed, 2 insertions, 20 deletions
diff --git a/gui/packages/desktop/src/main/index.js b/gui/packages/desktop/src/main/index.js
index 83d2c3e699..4409526ebc 100644
--- a/gui/packages/desktop/src/main/index.js
+++ b/gui/packages/desktop/src/main/index.js
@@ -674,21 +674,7 @@ const ApplicationMain = {
return 'securing';
case 'disconnecting':
- switch (tunnelState.details) {
- case 'reconnect':
- return 'securing';
-
- case 'block':
- return 'securing';
-
- case 'nothing':
- // handle the same way as disconnected
- break;
-
- default:
- throw new Error(`Invalid after disconnect state: ${(tunnelState.details: empty)}`);
- }
- // fallthrough
+ return 'securing';
case 'disconnected':
if (blockWhenDisconnected) {
@@ -698,8 +684,7 @@ const ApplicationMain = {
}
default:
- // unreachable, but can't prove it to flow because of the fallthrough
- throw new Error(`Invalid tunnel state: ${tunnelState.state}`);
+ throw new Error(`Invalid tunnel state: ${(tunnelState.state: empty)}`);
}
},
diff --git a/gui/packages/desktop/src/renderer/app.js b/gui/packages/desktop/src/renderer/app.js
index 356973a380..f0b4f3244f 100644
--- a/gui/packages/desktop/src/renderer/app.js
+++ b/gui/packages/desktop/src/renderer/app.js
@@ -247,9 +247,6 @@ export default class AppRenderer {
}
disconnectTunnel(): Promise<void> {
- // switch to the disconnected state ahead of time to make the app look more responsive
- this._reduxActions.connection.disconnected();
-
return this._daemonRpc.disconnectTunnel();
}