Revert operation remove logic
This commit is contained in:
parent
7f1440bc96
commit
593feb664c
|
@ -46,12 +46,17 @@ typedef NSMapTable<NSString *, id<SDWebImageOperation>> SDOperationsDictionary;
|
|||
// Cancel in progress downloader from queue
|
||||
SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
|
||||
id<SDWebImageOperation> operation;
|
||||
|
||||
@synchronized (self) {
|
||||
operation = [operationDictionary objectForKey:key];
|
||||
[operationDictionary removeObjectForKey:key];
|
||||
}
|
||||
if ([operation conformsToProtocol:@protocol(SDWebImageOperation)]) {
|
||||
[operation cancel];
|
||||
if (operation) {
|
||||
if ([operation conformsToProtocol:@protocol(SDWebImageOperation)]) {
|
||||
[operation cancel];
|
||||
}
|
||||
@synchronized (self) {
|
||||
[operationDictionary removeObjectForKey:key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue