Merge pull request #124 from rob-patchett/premature_connect_status

Conclude connection success only once the system starts using the tunnel
This commit is contained in:
Davide De Rosa 2019-10-17 17:16:48 +02:00 committed by GitHub
commit 5866c373eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)