aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelsManager.swift9
1 files changed, 5 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
index cd120a52..e5b59841 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
@@ -336,10 +336,8 @@ class TunnelsManager {
}
}
- if (tunnel.status == .restarting) && (session.status == .disconnected || session.status == .disconnecting) {
- if session.status == .disconnected {
- tunnel.startActivation(activationDelegate: self.activationDelegate)
- }
+ if tunnel.status == .restarting && session.status == .disconnected {
+ tunnel.startActivation(activationDelegate: self.activationDelegate)
return
}
@@ -442,6 +440,9 @@ class TunnelContainer: NSObject {
}
func refreshStatus() {
+ if (status == .restarting) && (tunnelProvider.connection.status == .disconnected || tunnelProvider.connection.status == .disconnecting) {
+ return
+ }
status = TunnelStatus(from: tunnelProvider.connection.status)
isActivateOnDemandEnabled = tunnelProvider.isOnDemandEnabled
}