From 3d1197b820d29200e49d194e8e965b9c7419df71 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 23 Jul 2022 21:59:14 +0800 Subject: [PATCH] When download start, mark the query cache operation finished to avoid bug behavior --- SDWebImage/Core/SDWebImageManager.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SDWebImage/Core/SDWebImageManager.m b/SDWebImage/Core/SDWebImageManager.m index 44f5838c..3b29632d 100644 --- a/SDWebImage/Core/SDWebImageManager.m +++ b/SDWebImage/Core/SDWebImageManager.m @@ -382,6 +382,11 @@ static id _defaultImageLoader; cacheType:(SDImageCacheType)cacheType progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDInternalCompletionBlock)completedBlock { + // Mark the cache operation end + @synchronized (operation) { + operation.cacheOperation = nil; + } + // Grab the image loader to use id imageLoader; if ([context[SDWebImageContextImageLoader] conformsToProtocol:@protocol(SDImageLoader)]) {