summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-09-07 11:45:57 +0200
committerLinus Färnstrand <linus@mullvad.net>2018-09-07 11:45:57 +0200
commitdb3990e6b3e05c4e7783a520ab24b264f41c2159 (patch)
tree5a7259800601c2f6e63f07282b0398a6953a2672
parent69c7d1daccdec2d9475de07c72233375a716eff6 (diff)
parent93b219f9fc313826e07390231e80f065c94f9c9f (diff)
downloadmullvadvpn-db3990e6b3e05c4e7783a520ab24b264f41c2159.tar.xz
mullvadvpn-db3990e6b3e05c4e7783a520ab24b264f41c2159.zip
Merge branch 'dont-autoconnect-without-account'
-rw-r--r--CHANGELOG.md2
-rw-r--r--mullvad-daemon/src/main.rs2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38f6d02e09..cb9ffc0bae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,6 +41,8 @@ Line wrap the file at 100 chars. Th
### Fixed
- Fix incorrect window position when using external display.
+- Don't auto-connect the daemon on start if no account token is set. This prevents the daemon from
+ blocking all internet if logging out from the app.
#### Linux
- The app window is now shown in its previous location, instead of at the center of the screen.
diff --git a/mullvad-daemon/src/main.rs b/mullvad-daemon/src/main.rs
index b67658c2ab..971c34276e 100644
--- a/mullvad-daemon/src/main.rs
+++ b/mullvad-daemon/src/main.rs
@@ -296,7 +296,7 @@ impl Daemon {
/// Consume the `Daemon` and run the main event loop. Blocks until an error happens or a
/// shutdown event is received.
pub fn run(mut self) -> Result<()> {
- if self.settings.get_auto_connect() {
+ if self.settings.get_auto_connect() && self.settings.get_account_token().is_some() {
info!("Automatically connecting since auto-connect is turned on");
self.set_target_state(TargetState::Secured);
}