Authored by Bogdan Poplauschi

Continuation of Fix #1366, addresses #1350 and reverts a part of #1221 - from co…

…mmit 6406d8e5, the wrong usage of dispatch_apply
This one fixes: #1425 and #1426
... ... @@ -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);
... ...