Checking for cancellation early in -operationDidStart
This commit is contained in:
parent
c2be31d4fa
commit
9b1c1f285c
1 changed files with 5 additions and 0 deletions
|
|
@ -271,6 +271,11 @@ static inline NSString * AFKeyPathFromOperationState(AFOperationState state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)operationDidStart {
|
- (void)operationDidStart {
|
||||||
|
if ([self isCancelled]) {
|
||||||
|
[self finish];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.connection = [[[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO] autorelease];
|
self.connection = [[[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO] autorelease];
|
||||||
|
|
||||||
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue