diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2023-04-26 19:01:11 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2023-05-03 16:41:55 +0200 |
| commit | 3f4cefd80af85e17bd11cc16ee6592dad5a5fdb8 (patch) | |
| tree | d3b64972aa494f59670b398cbdf1d69d9da2e19f | |
| parent | f3760caf18da794e3aaa95a2f40a492d04a3f5f8 (diff) | |
| download | mullvadvpn-3f4cefd80af85e17bd11cc16ee6592dad5a5fdb8.tar.xz mullvadvpn-3f4cefd80af85e17bd11cc16ee6592dad5a5fdb8.zip | |
Remove code from other branch
| -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`. |
