Skip to content

Commit

Permalink
Update tunnel manager to not return error for configuration loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Petersson committed Sep 22, 2023
1 parent 8018102 commit 25a9e6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions ios/MullvadVPN/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD

private func getInitTunnelManagerOperation() -> AsyncBlockOperation {
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()
Expand Down
4 changes: 2 additions & 2 deletions ios/MullvadVPN/TunnelManager/TunnelManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -187,7 +187,7 @@ final class TunnelManager: StorePaymentObserver {
self.updatePrivateKeyRotationTimer()
self.startNetworkMonitor()

completionHandler(completion.error)
completionHandler()
}

loadTunnelOperation.addObserver(
Expand Down

0 comments on commit 25a9e6a

Please sign in to comment.