Skip to content

Commit fc60c57

Browse files
committed
Merge branch 'master' of github.com:AFNetworking/AFNetworking
2 parents a9b9ebe + 4fd322e commit fc60c57

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

AFNetworking/AFHTTPClient.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,9 @@ - (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations
573573

574574
for (AFHTTPRequestOperation *operation in operations) {
575575
AFCompletionBlock originalCompletionBlock = [operation.completionBlock copy];
576+
__weak AFHTTPRequestOperation *weakOperation = operation;
576577
operation.completionBlock = ^{
577-
dispatch_queue_t queue = operation.successCallbackQueue ?: dispatch_get_main_queue();
578+
dispatch_queue_t queue = weakOperation.successCallbackQueue ?: dispatch_get_main_queue();
578579
dispatch_group_async(dispatchGroup, queue, ^{
579580
if (originalCompletionBlock) {
580581
originalCompletionBlock();

AFNetworking/AFImageRequestOperation.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
8282
dispatch_async(image_request_operation_processing_queue(), ^(void) {
8383
UIImage *processedImage = imageProcessingBlock(image);
8484

85-
dispatch_async(requestOperation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
85+
dispatch_async(operation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
8686
success(operation.request, operation.response, processedImage);
8787
});
8888
});
@@ -113,7 +113,7 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
113113
dispatch_async(image_request_operation_processing_queue(), ^(void) {
114114
NSImage *processedImage = imageProcessingBlock(image);
115115

116-
dispatch_async(requestOperation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
116+
dispatch_async(operation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) {
117117
success(operation.request, operation.response, processedImage);
118118
});
119119
});

0 commit comments

Comments
 (0)