File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -573,8 +573,9 @@ - (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations
573
573
574
574
for (AFHTTPRequestOperation *operation in operations) {
575
575
AFCompletionBlock originalCompletionBlock = [operation.completionBlock copy ];
576
+ __weak AFHTTPRequestOperation *weakOperation = operation;
576
577
operation.completionBlock = ^{
577
- dispatch_queue_t queue = operation .successCallbackQueue ?: dispatch_get_main_queue ();
578
+ dispatch_queue_t queue = weakOperation .successCallbackQueue ?: dispatch_get_main_queue ();
578
579
dispatch_group_async (dispatchGroup, queue, ^{
579
580
if (originalCompletionBlock) {
580
581
originalCompletionBlock ();
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
82
82
dispatch_async (image_request_operation_processing_queue (), ^(void ) {
83
83
UIImage *processedImage = imageProcessingBlock (image);
84
84
85
- dispatch_async (requestOperation .successCallbackQueue ?: dispatch_get_main_queue (), ^(void ) {
85
+ dispatch_async (operation .successCallbackQueue ?: dispatch_get_main_queue (), ^(void ) {
86
86
success (operation.request , operation.response , processedImage);
87
87
});
88
88
});
@@ -113,7 +113,7 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
113
113
dispatch_async (image_request_operation_processing_queue (), ^(void ) {
114
114
NSImage *processedImage = imageProcessingBlock (image);
115
115
116
- dispatch_async (requestOperation .successCallbackQueue ?: dispatch_get_main_queue (), ^(void ) {
116
+ dispatch_async (operation .successCallbackQueue ?: dispatch_get_main_queue (), ^(void ) {
117
117
success (operation.request , operation.response , processedImage);
118
118
});
119
119
});
You can’t perform that action at this time.
0 commit comments