summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/TunnelManager/TunnelManager.swift3
1 files changed, 3 insertions, 0 deletions
diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift
index c39232e942..e8ed251551 100644
--- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift
+++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift
@@ -585,6 +585,7 @@ class TunnelManager {
self.logger.error(chainedError: verificationError, message: "Failed to verify the tunnel and load tunnel settings. Removing the tunnel.")
tunnelProvider.removeFromPreferences()
+ .receive(on: self.stateQueue)
.mapError { error in
return .removeInconsistentVPNConfiguration(error)
}
@@ -600,6 +601,7 @@ class TunnelManager {
self.logger.error(chainedError: settingsReadError, message: "Failed to load tunnel settings. Removing the tunnel.")
tunnelProvider.removeFromPreferences()
+ .receive(on: self.stateQueue)
.mapError { error in
return .removeInconsistentVPNConfiguration(error)
}
@@ -615,6 +617,7 @@ class TunnelManager {
// Remove the orphaned tunnel.
case (.some(let tunnelProvider), .none):
tunnelProvider.removeFromPreferences()
+ .receive(on: self.stateQueue)
.mapError { error in
return .removeInconsistentVPNConfiguration(error)
}