diff --git a/Sources/Apollo/RequestChain.swift b/Sources/Apollo/RequestChain.swift index 01b7ab5770..b7dad66a1b 100644 --- a/Sources/Apollo/RequestChain.swift +++ b/Sources/Apollo/RequestChain.swift @@ -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.