From 17fb34c52ddcfc4ce34cdc187b3676fe3278dbfd Mon Sep 17 00:00:00 2001 From: Roman Truba Date: Mon, 23 Mar 2015 18:51:23 +0300 Subject: [PATCH] Synchronous request cancelation --- sdk/Source/Core/VKRequest.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/Source/Core/VKRequest.m b/sdk/Source/Core/VKRequest.m index 42739b5..71ab3da 100644 --- a/sdk/Source/Core/VKRequest.m +++ b/sdk/Source/Core/VKRequest.m @@ -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 {