Fixed #1693 Same URLs didn't cancel download

This commit is contained in:
Bogdan Poplauschi 2016-10-09 13:08:32 +03:00
parent bb640f1ca4
commit 032ab1dd6d
1 changed files with 1 additions and 2 deletions

View File

@ -227,9 +227,8 @@
[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];
};