Also refresh status
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
49bf55021f
commit
56ad5f74e9
|
@ -283,7 +283,10 @@ class TunnelsManager {
|
||||||
let tunnelProvider = session.manager as? NETunnelProviderManager,
|
let tunnelProvider = session.manager as? NETunnelProviderManager,
|
||||||
let tunnelConfiguration = TunnelContainer(tunnel: tunnelProvider).tunnelConfiguration,
|
let tunnelConfiguration = TunnelContainer(tunnel: 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 {
|
||||||
tunnel.tunnelProvider = tunnelProvider
|
tunnel.tunnelProvider = tunnelProvider
|
||||||
|
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)'")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue