summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-01-31 12:46:27 +0100
committerAndrej Mihajlov <and@mullvad.net>2022-02-02 17:37:00 +0100
commit038402d5bc025e0a1f259cc2e5d82c4589e1ec72 (patch)
tree67e40bfec5076e81d9bd539020cac79c13c0bc51
parent4944b983a10fcbb56c475169bc78efa4049209e3 (diff)
downloadmullvadvpn-038402d5bc025e0a1f259cc2e5d82c4589e1ec72.tar.xz
mullvadvpn-038402d5bc025e0a1f259cc2e5d82c4589e1ec72.zip
SetAccountOperation: always reset the tunnel provider reference
-rw-r--r--ios/MullvadVPN/TunnelManager/SetAccountOperation.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift
index 9d69fceda8..ee302f9f38 100644
--- a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift
+++ b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift
@@ -191,16 +191,16 @@ class SetAccountOperation: AsyncOperation {
// Remove VPN configuration
tunnelProvider.removeFromPreferences { error in
self.queue.async {
+ // Ignore error but log it
if let error = error {
- // Ignore error but log it
self.logger.error(
chainedError: AnyChainedError(error),
message: "Failed to remove VPN configuration."
)
- } else {
- self.state.setTunnelProvider(nil, shouldRefreshTunnelState: false)
}
+ self.state.setTunnelProvider(nil, shouldRefreshTunnelState: false)
+
completionHandler()
}
}