Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Conclude connection success only once the system starts using the tunnel #124

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down Expand Up @@ -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)
Expand Down