diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-10 08:19:07 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-10 08:19:07 +0000 |
commit | 5a7632bd4da17d928bae8a4be5950bae47f2c9bb (patch) | |
tree | c0cfb619105db043d9f7d2184d6cb344eeb9d875 /protocols/VKontakte | |
parent | 2f4eaac57045bcb45f0c7087437649a9f664410d (diff) |
VKontakte: fix(???) reconnect protocol after failure ExecuteRequest
git-svn-id: http://svn.miranda-ng.org/main/trunk@10942 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index 71ce7e8687..3d00097104 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -63,7 +63,14 @@ LBL_Restart: else if (pReq->bIsMainConn) {
if (m_iStatus >= ID_STATUS_CONNECTING && m_iStatus < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)
ConnectionFailed(LOGINERR_NONETWORK);
- else {
+ else if (pReq->m_iRetry){
+ pReq->bNeedsRestart = true;
+ Sleep(1000); //Pause for fix err
+ debugLogA("CVkProto::ExecuteRequest restarting retry = %d", MAX_RETRIES - pReq->m_iRetry);
+ pReq->m_iRetry--;
+ goto LBL_Restart;
+ }
+ else{
debugLogA("CVkProto::ExecuteRequest ShutdownSession");
ShutdownSession();
}
|