From f2644bb048f31b1f5a1f34c2a60000a2f7a7dbb6 Mon Sep 17 00:00:00 2001 From: HanXianzhao Date: Mon, 25 Jul 2022 02:54:28 +0800 Subject: [PATCH] fix: Missing finish --- Sources/Nuke/Tasks/TaskFetchWithPublisher.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Nuke/Tasks/TaskFetchWithPublisher.swift b/Sources/Nuke/Tasks/TaskFetchWithPublisher.swift index b75d7c937..3fe422a6b 100644 --- a/Sources/Nuke/Tasks/TaskFetchWithPublisher.swift +++ b/Sources/Nuke/Tasks/TaskFetchWithPublisher.swift @@ -50,7 +50,10 @@ final class TaskFetchWithPublisher: ImagePipelineTask<(Data, URLResponse?)> { } }) - onCancelled = cancellable.cancel + onCancelled = { + finish() + cancellable.cancel() + } } private func dataTaskDidFinish(_ result: PublisherCompletion) {