Skip to content

Commit

Permalink
Fixed #1693 Same URLs didn't cancel download
Browse files Browse the repository at this point in the history
  • Loading branch information
bpoplauschi committed Oct 9, 2016
1 parent bb640f1 commit 032ab1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SDWebImage/SDWebImageManager.m
Expand Up @@ -227,9 +227,8 @@ - (void)diskImageExistsForURL:(nullable NSURL *)url
[self safelyRemoveOperationFromRunning:strongOperation];
}
}];
__weak typeof(subOperationToken)weakSubOperationToken = subOperationToken;
operation.cancelBlock = ^{
[self.imageDownloader cancel:weakSubOperationToken];
[self.imageDownloader cancel:subOperationToken];
__strong __typeof(weakOperation) strongOperation = weakOperation;
[self safelyRemoveOperationFromRunning:strongOperation];
};
Expand Down

0 comments on commit 032ab1d

Please sign in to comment.