Checking for cancellation early in -operationDidStart
This commit is contained in:
parent
c2be31d4fa
commit
9b1c1f285c
@ -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];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user