Permalink
Browse files

Using addOperations:waitUntilFinished: instead of adding each operati…

…on individually in -enqueueBatchOfHTTPRequestOperations:... to fix an edge case bug where only one of the operations in a batch will run.
  • Loading branch information...
1 parent 24dfebb commit ff8e70a49ca8070f5b528794eb61cd9be4de0f9f @mattt mattt committed Nov 6, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 AFNetworking/AFHTTPClient.m
@@ -590,9 +590,8 @@ - (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations
dispatch_group_enter(dispatchGroup);
[batchedOperation addDependency:operation];
-
- [self enqueueHTTPRequestOperation:operation];
}
+ [self.operationQueue addOperations:operations waitUntilFinished:NO];
[self.operationQueue addOperation:batchedOperation];
}

0 comments on commit ff8e70a

Please sign in to comment.