Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/Apollo/RequestChain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ public class RequestChain: Cancellable {

/// Cancels the entire chain of interceptors.
public func cancel() {
guard self.isNotCancelled else {
// Do not proceed, this chain has been cancelled.
return
}

self.isCancelled.mutate { $0 = true }

// If an interceptor adheres to `Cancellable`, it should have its in-flight work cancelled as well.
Expand Down