diff options
| -rw-r--r-- | ios/MullvadVPN/TunnelManager/TunnelManager.swift | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift index 47f7196ea4..5bf37d8574 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift @@ -738,10 +738,9 @@ final class TunnelManager: StorePaymentObserver { @objc private func applicationDidBecomeActive(_ notification: Notification) { #if DEBUG - logger.debug("Refresh device state and tunnel status due to application becoming active.") + logger.debug("Refresh tunnel status due to application becoming active.") #endif refreshTunnelStatus() - refreshDeviceState() } fileprivate func selectRelay() throws -> RelaySelectorResult { @@ -818,32 +817,6 @@ final class TunnelManager: StorePaymentObserver { } } - private func refreshDeviceState() { - let operation = AsyncBlockOperation(dispatchQueue: internalQueue) { - do { - let newDeviceState = try SettingsManager.readDeviceState() - - self.setDeviceState(newDeviceState, persist: false) - } catch { - if let error = error as? KeychainError, error == .itemNotFound { - return - } - - self.logger.error(error: error, message: "Failed to refresh device state") - } - } - - operation.addCondition(MutuallyExclusive(category: OperationCategory.deviceStateUpdate.category)) - operation - .addObserver(BackgroundObserver( - application: application, - name: "Refresh device state", - cancelUponExpiration: true - )) - - operationQueue.addOperation(operation) - } - /// Update `TunnelStatus` from `NEVPNStatus`. /// Collects the `PacketTunnelStatus` from the tunnel via IPC if needed before assigning /// the `tunnelStatus`. |
