Run batch callbacks on success dispatch queue, falling back on main
This commit is contained in:
parent
bbacf3d7c6
commit
77837c48de
1 changed files with 2 additions and 1 deletions
|
|
@ -531,7 +531,8 @@ static void AFReachabilityCallback(SCNetworkReachabilityRef __unused target, SCN
|
|||
for (AFHTTPRequestOperation *operation in operations) {
|
||||
AFCompletionBlock originalCompletionBlock = [[operation.completionBlock copy] autorelease];
|
||||
operation.completionBlock = ^{
|
||||
dispatch_group_async(dispatchGroup, dispatch_get_main_queue(), ^{
|
||||
dispatch_queue_t queue = operation.successCallbackQueue ? operation.successCallbackQueue : dispatch_get_main_queue();
|
||||
dispatch_group_async(dispatchGroup, queue, ^{
|
||||
if (originalCompletionBlock) {
|
||||
originalCompletionBlock();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue