Commit 9a8b7aad authored by Jose Blaya's avatar Jose Blaya
Browse files

Improve how the app reconnects switching between protocols

parent d2e914ab
......@@ -215,14 +215,8 @@ class DefaultVPNProvider: VPNProvider, ConfigurationAccess, DatabaseAccess, Pref
preconditionFailure()
}
let fallbackDelay = delay ?? accessedConfiguration.vpnReconnectionDelay
activeProfile.disconnect { (error) in
if let _ = error {
callback?(error)
return
}
Macros.dispatch(after: .milliseconds(fallbackDelay)) {
activeProfile.connect(withConfiguration: self.vpnClientConfiguration(), callback)
}
Macros.dispatch(after: .milliseconds(fallbackDelay)) {
activeProfile.connect(withConfiguration: self.vpnClientConfiguration(), callback)
}
}
......
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