From ff8e70a49ca8070f5b528794eb61cd9be4de0f9f Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Tue, 6 Nov 2012 12:03:19 -0800 Subject: [PATCH] Using addOperations:waitUntilFinished: instead of adding each operation individually in -enqueueBatchOfHTTPRequestOperations:... to fix an edge case bug where only one of the operations in a batch will run. --- AFNetworking/AFHTTPClient.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index 67bdb33..1c1feb5 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -590,9 +590,8 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {} dispatch_group_enter(dispatchGroup); [batchedOperation addDependency:operation]; - - [self enqueueHTTPRequestOperation:operation]; } + [self.operationQueue addOperations:operations waitUntilFinished:NO]; [self.operationQueue addOperation:batchedOperation]; }