summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift
diff options
context:
space:
mode:
Diffstat (limited to 'ios/MullvadVPN/RelayCache/RelayCacheTracker.swift')
-rw-r--r--ios/MullvadVPN/RelayCache/RelayCacheTracker.swift8
1 files changed, 3 insertions, 5 deletions
diff --git a/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift b/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift
index c2efd6cb24..b5e9d87a44 100644
--- a/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift
+++ b/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift
@@ -98,7 +98,7 @@ extension RelayCache {
}
}
- func updateRelays(completionHandler: @escaping (OperationCompletion<RelayCache.FetchResult, RelayCache.Error>) -> Void) -> AnyCancellable {
+ func updateRelays(completionHandler: @escaping (OperationCompletion<RelayCache.FetchResult, RelayCache.Error>) -> Void) -> Cancellable {
let operation = UpdateRelaysOperation(
dispatchQueue: stateQueue,
restClient: REST.Client.shared,
@@ -126,9 +126,7 @@ extension RelayCache {
operationQueue.addOperation(operation)
- return AnyCancellable {
- operation.cancel()
- }
+ return operation
}
func read(completionHandler: @escaping (Result<CachedRelays, RelayCache.Error>) -> Void) {
@@ -318,7 +316,7 @@ fileprivate class UpdateRelaysOperation: AsyncOperation {
private let updateHandler: UpdateHandler
private var completionHandler: CompletionHandler?
- private var downloadCancellable: AnyCancellable?
+ private var downloadCancellable: Cancellable?
init(dispatchQueue: DispatchQueue,
restClient: REST.Client,