From d3ba76def321865ada03976be89fdc9cd18678c7 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Mon, 10 Dec 2018 17:03:17 +0530 Subject: [PATCH] TunnelsManager: Don't act on status change on tunnelProviders we don't have That causes errors we don't want, and duplicate notifications. --- WireGuard/WireGuard/VPN/TunnelsManager.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index d3f711a..b36c9f8 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -285,8 +285,6 @@ class TunnelsManager { guard let tunnelProvider = session.manager as? NETunnelProviderManager else { return } if let tunnel = self?.tunnels.first(where: { $0.tunnelProvider == tunnelProvider }) { tunnel.tunnelConnectionStatusDidChange() - } else if let tunnelName = tunnelProvider.localizedDescription, let tunnel = self?.tunnel(named: tunnelName) { - tunnel.tunnelConnectionStatusDidChange() } } }