Merge branch 'master' of github.com:AFNetworking/AFNetworking
This commit is contained in:
commit
fc60c57fa3
2 changed files with 4 additions and 3 deletions
|
|
@ -573,8 +573,9 @@ static void AFNetworkReachabilityReleaseCallback(__unused const void *info) {}
|
|||
|
||||
for (AFHTTPRequestOperation *operation in operations) {
|
||||
AFCompletionBlock originalCompletionBlock = [operation.completionBlock copy];
|
||||
__weak AFHTTPRequestOperation *weakOperation = operation;
|
||||
operation.completionBlock = ^{
|
||||
dispatch_queue_t queue = operation.successCallbackQueue ?: dispatch_get_main_queue();
|
||||
dispatch_queue_t queue = weakOperation.successCallbackQueue ?: dispatch_get_main_queue();
|
||||
dispatch_group_async(dispatchGroup, queue, ^{
|
||||
if (originalCompletionBlock) {
|
||||
originalCompletionBlock();
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
|||
dispatch_async(image_request_operation_processing_queue(), ^(void) {
|
||||
UIImage *processedImage = imageProcessingBlock(image);
|
||||
|
||||
dispatch_async(requestOperation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
|
||||
dispatch_async(operation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
|
||||
success(operation.request, operation.response, processedImage);
|
||||
});
|
||||
});
|
||||
|
|
@ -113,7 +113,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
|||
dispatch_async(image_request_operation_processing_queue(), ^(void) {
|
||||
NSImage *processedImage = imageProcessingBlock(image);
|
||||
|
||||
dispatch_async(requestOperation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
|
||||
dispatch_async(operation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
|
||||
success(operation.request, operation.response, processedImage);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue