Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
2d76de73
Commit
2d76de73
authored
Jan 23, 2019
by
Jose Blaya
Browse files
disconnect onDemand value if user disconnects manually
parent
5dc8b11a
Changes
1
Hide whitespace changes
Inline
Side-by-side
PIALibrary/Sources/Library/VPN/IKEv2Profile.swift
View file @
2d76de73
...
...
@@ -86,10 +86,7 @@ public class IKEv2Profile: NetworkExtensionProfile {
}
// prevent reconnection
if
Client
.
preferences
.
trustCellularData
{
self
.
currentVPN
.
isOnDemandEnabled
=
false
}
self
.
currentVPN
.
isOnDemandEnabled
=
false
self
.
currentVPN
.
saveToPreferences
{
(
error
)
in
if
let
error
=
error
{
callback
?(
error
)
...
...
@@ -130,9 +127,7 @@ public class IKEv2Profile: NetworkExtensionProfile {
public
func
disable
(
_
callback
:
SuccessLibraryCallback
?)
{
currentVPN
.
loadFromPreferences
{
(
error
)
in
self
.
currentVPN
.
isEnabled
=
false
if
Client
.
preferences
.
trustCellularData
{
self
.
currentVPN
.
isOnDemandEnabled
=
false
}
self
.
currentVPN
.
isOnDemandEnabled
=
false
self
.
currentVPN
.
saveToPreferences
(
completionHandler
:
callback
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment