From bdf34f88828389130420c2cb5e4590888ce495a1 Mon Sep 17 00:00:00 2001 From: Robert Patchett Date: Thu, 17 Oct 2019 14:23:16 +0200 Subject: [PATCH] Set tunnel provider's reasserting to false after the system starts using the tunnel --- .../OpenVPN/AppExtension/OpenVPNTunnelProvider.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift b/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift index cf872c7b..958632c7 100644 --- a/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift +++ b/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift @@ -484,8 +484,6 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate { /// :nodoc: public func sessionDidStart(_ session: OpenVPNSession, remoteAddress: String, options: OpenVPN.Configuration) { - reasserting = false - log.info("Session did start") log.info("Returned ifconfig parameters:") @@ -522,6 +520,8 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate { } bringNetworkUp(remoteAddress: remoteAddress, localOptions: session.configuration, options: options) { (error) in + self.reasserting = false + if let error = error { log.error("Failed to configure tunnel: \(error)") self.pendingStartHandler?(error)