TunnelsManager: Don't act on status change on tunnelProviders we don't have

That causes errors we don't want, and duplicate notifications.
This commit is contained in:
Roopesh Chander 2018-12-10 17:03:17 +05:30
parent 94b81fc577
commit d3ba76def3
1 changed files with 0 additions and 2 deletions

View File

@ -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()
}
}
}