Synchronous request cancelation

This commit is contained in:
Roman Truba 2015-03-23 18:51:23 +03:00
parent 8b809e2b45
commit 17fb34c52d
1 changed files with 3 additions and 1 deletions

View File

@ -401,9 +401,11 @@
}
- (void)cancel {
_executionOperation.completionBlock = nil;
[_executionOperation cancel];
_executionOperation = nil;
[NSObject cancelPreviousPerformRequestsWithTarget:self];
// [self provideError:[NSError errorWithVkError:[VKError errorWithCode:VK_API_CANCELED]]];
[self provideError:[NSError errorWithVkError:[VKError errorWithCode:VK_API_CANCELED]]];
}
- (void)setupProgress:(VKHTTPOperation *)operation {