TunnelsManager: Ignore status changes on tunnel providers we don't have

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-02-08 04:38:08 +05:30
parent 1b8b9ed7ee
commit 9eed5fd898
1 changed files with 1 additions and 2 deletions

View File

@ -316,8 +316,7 @@ class TunnelsManager {
let tunnelConfiguration = 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 return
tunnel.refreshStatus()
} }
wg_log(.debug, message: "Tunnel '\(tunnel.name)' connection status changed to '\(tunnel.tunnelProvider.connection.status)'") wg_log(.debug, message: "Tunnel '\(tunnel.name)' connection status changed to '\(tunnel.tunnelProvider.connection.status)'")