From 95bcd2278c0bdbf6847a7c9939beece2b32091a2 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Mon, 10 Oct 2011 13:26:17 -0500 Subject: [PATCH] Only execute in main queue --- AFNetworking/AFURLConnectionOperation.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index be7e10f..30e04e8 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -149,8 +149,9 @@ static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { __block id _blockSelf = self; [super setCompletionBlock:^ { + block(); + dispatch_async(dispatch_get_main_queue(), ^(void) { - block(); [_blockSelf setCompletionBlock:nil]; }); }];