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

Reset the socket in AppPreferences before update the socket object in the SettingsViewController

parent d86385ec
...@@ -322,11 +322,10 @@ class SettingsViewController: AutolayoutViewController { ...@@ -322,11 +322,10 @@ class SettingsViewController: AutolayoutViewController {
guard let currentOpenVPNConfiguration = pendingPreferences.vpnCustomConfiguration(for: PIATunnelProfile.vpnType) as? PIATunnelProvider.Configuration else { guard let currentOpenVPNConfiguration = pendingPreferences.vpnCustomConfiguration(for: PIATunnelProfile.vpnType) as? PIATunnelProvider.Configuration else {
fatalError("No default VPN custom configuration provided for PIA protocol") fatalError("No default VPN custom configuration provided for PIA protocol")
} }
AppPreferences.shared.reset()
pendingOpenVPNSocketType = AppPreferences.shared.piaSocketType pendingOpenVPNSocketType = AppPreferences.shared.piaSocketType
pendingOpenVPNConfiguration = currentOpenVPNConfiguration.builder() pendingOpenVPNConfiguration = currentOpenVPNConfiguration.builder()
AppPreferences.shared.reset()
redisplaySettings() redisplaySettings()
reportUpdatedPreferences() reportUpdatedPreferences()
} }
......
Supports Markdown
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