Skip to content

Commit

Permalink
[Issue domesticcatsoftware#56] Wrapping completion block in async_dis…
Browse files Browse the repository at this point in the history
…patch to main queue
  • Loading branch information
mattt committed Oct 10, 2011
1 parent b772492 commit f1fa6f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions AFNetworking/AFURLConnectionOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ - (void)setCompletionBlock:(void (^)(void))block {

__block id _blockSelf = self;
[super setCompletionBlock:^ {
block();
[_blockSelf setCompletionBlock:nil];
dispatch_async(dispatch_get_main_queue(), ^(void) {
block();
[_blockSelf setCompletionBlock:nil];
});
}];
}

Expand Down

0 comments on commit f1fa6f1

Please sign in to comment.