summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--mullvad-daemon/src/main.rs5
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 34bf5b0307..4752664d6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
* **Fixed**: for any bug fixes.
* **Security**: in case of vulnerabilities.
+## [Unreleased]
+### Fixed
+- Hold off notifying the frontend of the 'unsecure' state until the VPN tunnel is actually
+ completely disconnected.
+
## [2017.1-beta6] - 2017-11-09
### Added
diff --git a/mullvad-daemon/src/main.rs b/mullvad-daemon/src/main.rs
index 2a39cc163a..f059b07379 100644
--- a/mullvad-daemon/src/main.rs
+++ b/mullvad-daemon/src/main.rs
@@ -169,9 +169,10 @@ pub enum TunnelState {
impl TunnelState {
pub fn as_security_state(&self) -> SecurityState {
+ use TunnelState::*;
match *self {
- TunnelState::Connected => SecurityState::Secured,
- _ => SecurityState::Unsecured,
+ NotRunning | Connecting => SecurityState::Unsecured,
+ Connected | Exiting => SecurityState::Secured,
}
}
}