mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-17 22:19:08 +00:00
Prepare before disconnection intent
manager is nil otherwise in connect/disconnect. Doesn't apply to reinstall/reconnect.
This commit is contained in:
parent
af51911536
commit
3bf340c74c
@ -200,9 +200,13 @@ public class IntentDispatcher {
|
||||
|
||||
public static func handleDisableVPN(_ intent: DisableVPNIntent, interaction: INInteraction?, completionHandler: ((Error?) -> Void)?) {
|
||||
log.info("Disabling VPN...")
|
||||
VPN.shared.disconnect { (error) in
|
||||
notifyServiceUpdate()
|
||||
completionHandler?(error)
|
||||
|
||||
let vpn = VPN.shared
|
||||
vpn.prepare {
|
||||
vpn.disconnect { (error) in
|
||||
notifyServiceUpdate()
|
||||
completionHandler?(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user