Commit b8b0154f authored by Jose Blaya's avatar Jose Blaya
Browse files

Force stopVPNTunnel if the error is thrown saving the preferences

parent 92e336b9
......@@ -86,6 +86,7 @@ public class IKEv2Profile: NetworkExtensionProfile {
self.currentVPN.saveToPreferences { (error) in
if let error = error {
self.currentVPN.connection.stopVPNTunnel()
callback?(error)
return
}
......
......@@ -102,6 +102,7 @@ public class IPSecProfile: NetworkExtensionProfile {
self.currentVPN.saveToPreferences { (error) in
if let error = error {
self.currentVPN.connection.stopVPNTunnel()
callback?(error)
return
}
......
......@@ -90,6 +90,7 @@ public class PIATunnelProfile: NetworkExtensionProfile {
vpn.saveToPreferences { (error) in
if let error = error {
vpn.connection.stopVPNTunnel()
callback?(error)
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment