VPN: Reload the tunnel before starting it up
To avoid errors like this: https://stackoverflow.com/q/47550706
This commit is contained in:
parent
3ffd4a8280
commit
8d3b616fa8
|
@ -272,6 +272,8 @@ class TunnelContainer: NSObject {
|
||||||
s.status = .inactive
|
s.status = .inactive
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
s.tunnelProvider.loadFromPreferences { [weak s] (error) in
|
||||||
|
guard let s = s else { return }
|
||||||
s.startObservingTunnelStatus()
|
s.startObservingTunnelStatus()
|
||||||
let session = (s.tunnelProvider.connection as! NETunnelProviderSession)
|
let session = (s.tunnelProvider.connection as! NETunnelProviderSession)
|
||||||
do {
|
do {
|
||||||
|
@ -284,6 +286,7 @@ class TunnelContainer: NSObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fileprivate func startDeactivation() {
|
fileprivate func startDeactivation() {
|
||||||
assert(status == .active)
|
assert(status == .active)
|
||||||
|
|
Loading…
Reference in New Issue