diff options
author | Roopesh Chander <roop@roopc.net> | 2018-12-11 03:48:24 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-12-11 03:48:28 +0530 |
commit | 1ded24f0e00c6d552d4b81d6da5b92475d1d124d (patch) | |
tree | e400a0aa1f4c5953cfbf726e1707c55c67c06721 /WireGuard/WireGuard/VPN/TunnelsManager.swift | |
parent | Remove the feature of waiting for another tunnel to deactivate (diff) | |
download | wireguard-apple-1ded24f0e00c6d552d4b81d6da5b92475d1d124d.tar.xz wireguard-apple-1ded24f0e00c6d552d4b81d6da5b92475d1d124d.zip |
TunnelsManager: Error out only on no-internet scenario
The other scenario happens even during reloading of a tunnel for activation.
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/VPN/TunnelsManager.swift | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index 9eaecff..222100d 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -286,10 +286,10 @@ class TunnelsManager { // In case our attempt to start the tunnel, didn't succeed if (tunnel == s.tunnelBeingActivated) { if (session.status == .disconnected) { - let error = (InternetReachability.currentStatus() == .notReachable ? - TunnelsManagerError.tunnelActivationFailedNoInternetConnection : - TunnelsManagerError.tunnelActivationFailedInternalError) - s.activationDelegate?.tunnelActivationFailed(tunnel: tunnel, error: error) + if (InternetReachability.currentStatus() == .notReachable) { + let error = TunnelsManagerError.tunnelActivationFailedNoInternetConnection + s.activationDelegate?.tunnelActivationFailed(tunnel: tunnel, error: error) + } s.tunnelBeingActivated = nil } else if (session.status == .connected) { s.tunnelBeingActivated = nil |