diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-11-03 06:09:07 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-11-03 06:09:57 +0100 |
commit | 9e9898f17d2c61e22e4fd144bf44cc2f6572beb2 (patch) | |
tree | 7ab2fec03c2bc772fd977ca6054dd4b931653182 | |
parent | Tunnels list: Remove separator lines in the table view (diff) | |
download | wireguard-apple-9e9898f17d2c61e22e4fd144bf44cc2f6572beb2.tar.xz wireguard-apple-9e9898f17d2c61e22e4fd144bf44cc2f6572beb2.zip |
TunnelsManager: do not change back to inactive if we are resolving the endpoint
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | WireGuard/WireGuard/VPN/TunnelsManager.swift | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index 925b5ce..eb69ccd 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -48,6 +48,7 @@ class TunnelsManager { for tunnel in tunnels { if (tunnel.status != .inactive) { currentTunnel = tunnel + break } } self.tunnels = tunnels @@ -439,6 +440,10 @@ class TunnelContainer: NSObject { } return } + if (s.status == .resolvingEndpointDomains && connection.status == .disconnected) { + // Don't change to .inactive if we're still resolving endpoints + return + } s.status = TunnelStatus(from: connection.status) if (s.status == .inactive) { s.stopObservingTunnelStatus() |