diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-12-01 14:52:45 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-12-01 14:52:45 +0100 |
| commit | dff1a18eb7a661e7b0cf5a376c2098e491a7cf9f (patch) | |
| tree | a697819597d0a829a09dee06f94b9468d4782fae | |
| parent | 3606fee6093454c45bfecd06245d1d066e89a4ad (diff) | |
| download | mullvadvpn-dff1a18eb7a661e7b0cf5a376c2098e491a7cf9f.tar.xz mullvadvpn-dff1a18eb7a661e7b0cf5a376c2098e491a7cf9f.zip | |
Converting TunnelState::Exiting to SecurityState::Secured
| -rw-r--r-- | mullvad-daemon/src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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, } } } |
