summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-10-08 14:44:16 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-11-03 13:30:51 +0100
commiteb7fd4d132befe0073b0a0d79b1a7aae85f99cf8 (patch)
tree481fde0fabbb58892c97ab4d6b82d1b4131660b9
parent7ec35a8a320b601305b9f2d796368d785faf58f8 (diff)
downloadmullvadvpn-eb7fd4d132befe0073b0a0d79b1a7aae85f99cf8.tar.xz
mullvadvpn-eb7fd4d132befe0073b0a0d79b1a7aae85f99cf8.zip
TunnelManager: dispatch return value on state queue
-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)
}