From 662af980c3642ead5080635258e37a6934407784 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Mon, 8 Aug 2011 20:07:55 -0500 Subject: [PATCH] Don't wait for selectors to perform on main thread, and don't schedule in particular run loops --- AFNetworking/AFHTTPRequestOperation.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AFNetworking/AFHTTPRequestOperation.m b/AFNetworking/AFHTTPRequestOperation.m index 211b398..9ce36da 100644 --- a/AFNetworking/AFHTTPRequestOperation.m +++ b/AFNetworking/AFHTTPRequestOperation.m @@ -250,7 +250,7 @@ static inline BOOL AFHTTPOperationStateTransitionIsValid(AFHTTPOperationState fr self.responseBody = [NSData dataWithData:self.dataAccumulator]; self.dataAccumulator = nil; - [self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:YES modes:[self.runLoopModes allObjects]]; + [self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:NO]; } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { @@ -258,7 +258,7 @@ static inline BOOL AFHTTPOperationStateTransitionIsValid(AFHTTPOperationState fr self.error = error; - [self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:YES modes:[self.runLoopModes allObjects]]; + [self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:NO]; } - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse {