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

Commit

Permalink
Merge pull request #124 from rob-patchett/premature_connect_status
Browse files Browse the repository at this point in the history
Conclude connection success only once the system starts using the tunnel
  • Loading branch information
keeshux authored Oct 17, 2019
2 parents 9619d21 + bdf34f8 commit 5866c37
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 5866c37

Please sign in to comment.