From ec5369db135b9f0a2f4ab3e70b583697dc95b1f1 Mon Sep 17 00:00:00 2001 From: Bryn Bodayle Date: Tue, 1 Apr 2014 10:21:11 -0500 Subject: [PATCH] Fixed issue where cancelled operations aren't removed from runningOperations --- SDWebImage/SDWebImageManager.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 2e893ec9..b4361a0e 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -191,6 +191,10 @@ }]; operation.cancelBlock = ^{ [subOperation cancel]; + + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:weakOperation]; + } }; } else if (image) {