summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/AppDelegate.swift9
-rw-r--r--ios/MullvadVPN/TunnelManager/TunnelManager.swift4
2 files changed, 6 insertions, 7 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index 5bd73b1d52..4bbbff6657 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -434,12 +434,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
}
private func getInitTunnelManagerOperation() -> AsyncBlockOperation {
+ // This operation is always treated as successful no matter what the configuration load yields.
+ // If the tunnel settings or device state can't be read, we simply pretend they are not there
+ // and leave user in logged out state. VPN config will be removed as well.
AsyncBlockOperation(dispatchQueue: .main) { finish in
- self.tunnelManager.loadConfiguration { error in
- if let error {
- fatalError(error.localizedDescription)
- }
-
+ self.tunnelManager.loadConfiguration {
self.logger.debug("Finished initialization.")
NotificationManager.shared.updateNotifications()
diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift
index 40ae1a1160..260a2edd7e 100644
--- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift
+++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift
@@ -168,7 +168,7 @@ final class TunnelManager: StorePaymentObserver {
// MARK: - Public methods
- func loadConfiguration(completionHandler: @escaping (Error?) -> Void) {
+ func loadConfiguration(completionHandler: @escaping () -> Void) {
let loadTunnelOperation = LoadTunnelConfigurationOperation(
dispatchQueue: internalQueue,
interactor: TunnelInteractorProxy(self)
@@ -187,7 +187,7 @@ final class TunnelManager: StorePaymentObserver {
self.updatePrivateKeyRotationTimer()
self.startNetworkMonitor()
- completionHandler(completion.error)
+ completionHandler()
}
loadTunnelOperation.addObserver(