aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-02-08 04:38:08 +0530
committerRoopesh Chander <roop@roopc.net>2019-02-08 04:40:11 +0530
commit9eed5fd89854e327ce8dcc5c3db8fe205d5cdd8c (patch)
tree88be95735b919bf9dc58b2b2b9036237fbc40566 /WireGuard/WireGuard
parentiOS: Use shorter pretty time (diff)
downloadwireguard-apple-9eed5fd89854e327ce8dcc5c3db8fe205d5cdd8c.tar.xz
wireguard-apple-9eed5fd89854e327ce8dcc5c3db8fe205d5cdd8c.zip
TunnelsManager: Ignore status changes on tunnel providers we don't have
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelsManager.swift3
1 files changed, 1 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
index e5b59841..a7909ff3 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
@@ -316,8 +316,7 @@ class TunnelsManager {
let tunnelConfiguration = tunnelProvider.tunnelConfiguration,
let tunnel = self.tunnels.first(where: { $0.tunnelConfiguration == tunnelConfiguration }) else { return }
if tunnel.tunnelProvider != tunnelProvider {
- tunnel.tunnelProvider = tunnelProvider
- tunnel.refreshStatus()
+ return
}
wg_log(.debug, message: "Tunnel '\(tunnel.name)' connection status changed to '\(tunnel.tunnelProvider.connection.status)'")