Continuation of Fix #1366, addresses #1350 and reverts a part of #1221 - from commit 6406d8e, the wrong usage of dispatch_apply

This one fixes: #1425 and #1426
This commit is contained in:
Bogdan Poplauschi 2016-01-19 19:08:18 +02:00
parent 6a623cd58f
commit a8fca6584f
1 changed files with 5 additions and 1 deletions

View File

@ -80,7 +80,11 @@
totalCount:self.prefetchURLs.count
];
}
else if (self.finishedCount == self.requestedCount) {
if (self.prefetchURLs.count > self.requestedCount) {
dispatch_async(self.prefetcherQueue, ^{
[self startPrefetchingAtIndex:self.requestedCount];
});
} else if (self.finishedCount == self.requestedCount) {
[self reportStatus];
if (self.completionBlock) {
self.completionBlock(self.finishedCount, self.skippedCount);