summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-16 07:23:09 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-16 07:23:09 +0000
commit0bff8535f2a17f3dff080a994a6cd61c145b9cf3 (patch)
tree0a7d827c03fd306f02b3e7783d36eaf0dc726275
parent97e207d17f76808160865b254a5d61c3ab86cebf (diff)
VKontakte:
add sleep after error 6 fix needs restart logic git-svn-id: http://svn.miranda-ng.org/main/trunk@10468 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index c9a36f42d6..0457b460c4 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -100,8 +100,10 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply,
ConnectionFailed(LOGINERR_WRONGPASSWORD);
else if (iErrorCode == 14) // captcha
ApplyCaptcha(pReq, pError);
- else if (iErrorCode == 6) // Too many requests per second
+ else if (iErrorCode == 6) {// Too many requests per second
pReq->bNeedsRestart = true;
+ Sleep(330); //Pause for fix err 6
+ }
return iErrorCode == 0;
}
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index b736fad51a..8669646faa 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -35,6 +35,7 @@ void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq)
CMStringA str;
LBL_Restart:
+ pReq->bNeedsRestart = false;
pReq->szUrl = pReq->m_szUrl.GetBuffer();
if (!pReq->m_szParam.IsEmpty()) {
if (pReq->requestType == REQUEST_GET) {