summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-03-21 14:33:33 +0100
committerAndrej Mihajlov <and@mullvad.net>2022-03-24 14:00:24 +0100
commit8058f8fc38f0ce34c39bca2d6fc146ac085d5eca (patch)
tree0b6f1e527e56c1675c096dfc11843986bde0f552 /ios/MullvadVPN/AddressCache/AddressCacheTracker.swift
parent02c80f6534067e247fffb64e0b448ed1da77fd4d (diff)
downloadmullvadvpn-8058f8fc38f0ce34c39bca2d6fc146ac085d5eca.tar.xz
mullvadvpn-8058f8fc38f0ce34c39bca2d6fc146ac085d5eca.zip
Add conformance of Operation to Cancellable, drop AnyCancellable
Diffstat (limited to 'ios/MullvadVPN/AddressCache/AddressCacheTracker.swift')
-rw-r--r--ios/MullvadVPN/AddressCache/AddressCacheTracker.swift6
1 files changed, 2 insertions, 4 deletions
diff --git a/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift b/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift
index bf313ddcb8..8502d12ffc 100644
--- a/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift
+++ b/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift
@@ -83,7 +83,7 @@ extension AddressCache {
}
}
- func updateEndpoints(completionHandler: ((_ result: CacheUpdateResult) -> Void)? = nil) -> AnyCancellable {
+ func updateEndpoints(completionHandler: ((_ result: CacheUpdateResult) -> Void)? = nil) -> Cancellable {
let operation = UpdateAddressCacheOperation(
queue: stateQueue,
restClient: restClient,
@@ -106,9 +106,7 @@ extension AddressCache {
operationQueue.addOperation(operation)
- return AnyCancellable {
- operation.cancel()
- }
+ return operation
}
private func scheduleEndpointsUpdate(startTime: DispatchWallTime) {