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)?) {
|
public static func handleDisableVPN(_ intent: DisableVPNIntent, interaction: INInteraction?, completionHandler: ((Error?) -> Void)?) {
|
||||||
log.info("Disabling VPN...")
|
log.info("Disabling VPN...")
|
||||||
VPN.shared.disconnect { (error) in
|
|
||||||
notifyServiceUpdate()
|
let vpn = VPN.shared
|
||||||
completionHandler?(error)
|
vpn.prepare {
|
||||||
|
vpn.disconnect { (error) in
|
||||||
|
notifyServiceUpdate()
|
||||||
|
completionHandler?(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue