Checking for cancellation early in -operationDidStart

This commit is contained in:
Mattt Thompson 2011-10-06 10:15:58 -05:00
parent c2be31d4fa
commit 9b1c1f285c

View file

@ -271,6 +271,11 @@ static inline NSString * AFKeyPathFromOperationState(AFOperationState state) {
}
- (void)operationDidStart {
if ([self isCancelled]) {
[self finish];
return;
}
self.connection = [[[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO] autorelease];
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];