aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-02-09 19:07:17 +0530
committerRoopesh Chander <roop@roopc.net>2019-02-09 19:42:50 +0530
commit7720307fc92e2dfd14fd2f8630d5b3a0a867c6c2 (patch)
tree9c1414e33d38bbf596cdfbf1c50b2061c5a8ed06 /WireGuard/WireGuard/Tunnel/TunnelsManager.swift
parentVersion bump (diff)
downloadwireguard-apple-7720307fc92e2dfd14fd2f8630d5b3a0a867c6c2.tar.xz
wireguard-apple-7720307fc92e2dfd14fd2f8630d5b3a0a867c6c2.zip
TunnelsManager: No need to access tunnelConfiguration on status change
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelsManager.swift6
1 files changed, 1 insertions, 5 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
index 8718ccf6..fbfd81aa 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
@@ -313,11 +313,7 @@ class TunnelsManager {
guard let self = self,
let session = statusChangeNotification.object as? NETunnelProviderSession,
let tunnelProvider = session.manager as? NETunnelProviderManager,
- let tunnelConfiguration = tunnelProvider.tunnelConfiguration,
- let tunnel = self.tunnels.first(where: { $0.tunnelConfiguration == tunnelConfiguration }) else { return }
- if tunnel.tunnelProvider != tunnelProvider {
- return
- }
+ let tunnel = self.tunnels.first(where: { $0.tunnelProvider == tunnelProvider }) else { return }
wg_log(.debug, message: "Tunnel '\(tunnel.name)' connection status changed to '\(tunnel.tunnelProvider.connection.status)'")