TunnelsManager: do not change back to inactive if we are resolving the endpoint
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
ae2ae87bbe
commit
9e9898f17d
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue