TunnelsManager: use new helper

This commit is contained in:
Jason A. Donenfeld 2019-01-22 15:20:50 +01:00
parent f1cec084da
commit 465b9037ba
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ class TunnelsManager {
guard let self = self, guard let self = self,
let session = statusChangeNotification.object as? NETunnelProviderSession, let session = statusChangeNotification.object as? NETunnelProviderSession,
let tunnelProvider = session.manager as? NETunnelProviderManager, let tunnelProvider = session.manager as? NETunnelProviderManager,
let tunnelConfiguration = TunnelContainer(tunnel: tunnelProvider).tunnelConfiguration, let tunnelConfiguration = tunnelProvider.tunnelConfiguration,
let tunnel = self.tunnels.first(where: { $0.tunnelConfiguration == tunnelConfiguration }) else { return } let tunnel = self.tunnels.first(where: { $0.tunnelConfiguration == tunnelConfiguration }) else { return }
if tunnel.tunnelProvider != tunnelProvider { if tunnel.tunnelProvider != tunnelProvider {
tunnel.tunnelProvider = tunnelProvider tunnel.tunnelProvider = tunnelProvider