Fixing AFHTTPRequestOperation -setCancelled:
This commit is contained in:
parent
a3970f823d
commit
085d14ed82
1 changed files with 5 additions and 3 deletions
|
|
@ -237,12 +237,14 @@ static NSThread *_networkRequestThread = nil;
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setCancelled:(BOOL)isCancelled {
|
||||
- (void)setCancelled:(BOOL)cancelled {
|
||||
[self willChangeValueForKey:@"isCancelled"];
|
||||
_cancelled = YES;
|
||||
_cancelled = cancelled;
|
||||
[self didChangeValueForKey:@"isCancelled"];
|
||||
|
||||
self.state = AFHTTPOperationFinishedState;
|
||||
if ([self isCancelled]) {
|
||||
self.state = AFHTTPOperationFinishedState;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)responseString {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue