diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-06 21:35:16 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-06 21:35:16 +0000 |
| commit | 44b0e68ba9ea23c45949d285565db9d38db7fa99 (patch) | |
| tree | 4a27e395adfabe13de413aaef83ba911330c625e | |
| parent | 7dea609e6b4ec0918596e2f85c348ee10b597001 (diff) | |
| download | mullvadvpn-44b0e68ba9ea23c45949d285565db9d38db7fa99.tar.xz mullvadvpn-44b0e68ba9ea23c45949d285565db9d38db7fa99.zip | |
Auto-connect based on autoSecure option
| -rw-r--r-- | app/lib/backend-routing.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/lib/backend-routing.js b/app/lib/backend-routing.js index 7ff114f709..0ea354a594 100644 --- a/app/lib/backend-routing.js +++ b/app/lib/backend-routing.js @@ -8,8 +8,13 @@ export default function mapBackendEventsToRouter(backend, store) { setTimeout(() => { const { settings } = store.getState(); - const server = backend.serverInfo(settings.preferredServer); - backend.connect(server.address); + + // auto-connect only if autoSecure is on + if(settings.autoSecure) { + const server = backend.serverInfo(settings.preferredServer); + backend.connect(server.address); + } + store.dispatch(replace('/connect')); }, 1000); }); |
