summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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();
}