Permalink
Browse files

had the main thread callback conditional backwards

  • Loading branch information...
1 parent 92aedd3 commit 2be5406dabad104fcdd1ac96e244ba781b181900 Jeremy Schoenherr committed Mar 31, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 Classes/ASIHTTPRequest.m
View
@@ -1067,10 +1067,11 @@ - (void)startRequest
if ([self isCancelled]) {
return;
}
- if (shouldCallbackOnMainThread)
+ if (shouldCallbackOnMainThread) {
[self performSelectorOnMainThread:@selector(requestStarted) withObject:nil waitUntilDone:[NSThread isMainThread]];
- else
+ } else {
[self requestStarted];
+ }
[self setDownloadComplete:NO];
[self setComplete:NO];
@@ -2274,9 +2275,9 @@ - (void)readResponseHeaders
CFRelease(message);
if (shouldCallbackOnMainThread) {
- [self requestReceivedResponseHeaders:[[[self responseHeaders] copy] autorelease]];
- } else {
[self performSelectorOnMainThread:@selector(requestReceivedResponseHeaders:) withObject:[[[self responseHeaders] copy] autorelease] waitUntilDone:[NSThread isMainThread]];
+ } else {
+ [self requestReceivedResponseHeaders:[[[self responseHeaders] copy] autorelease]];
}
}

0 comments on commit 2be5406

Please sign in to comment.