TunnelsManager: do not change back to inactive if we are resolving the endpoint

This commit is contained in:
Jason A. Donenfeld 2018-11-03 06:09:07 +01:00
parent 929470c693
commit 8bbc49015c
1 changed files with 5 additions and 0 deletions

View File

@ -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()