summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index 2f969937fc..a89f69ced3 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -81,7 +81,7 @@ void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq)
}
debugLogA("CVkProto::ExecuteRequest pReq->bNeedsRestart = %d", (int)pReq->bNeedsRestart);
- if (!reply)
+ if (!reply && pReq->m_bApiReq)
m_hAPIConnection = NULL;
} while (pReq->bNeedsRestart && !m_bTerminated);
@@ -94,11 +94,12 @@ AsyncHttpRequest* CVkProto::Push(AsyncHttpRequest *pReq, int iTimeout)
{
debugLogA("CVkProto::Push");
pReq->timeout = iTimeout;
- if (pReq->m_bApiReq)
- {
- if (m_VKLang != nullptr) pReq << TCHAR_PARAM("lang", m_VKLang);
+ if (pReq->m_bApiReq) {
pReq << VER_API;
+ if (!IsEmpty(m_VKLang))
+ pReq << TCHAR_PARAM("lang", m_VKLang);
}
+
{
mir_cslock lck(m_csRequestsQueue);
m_arRequestsQueue.insert(pReq);
@@ -124,7 +125,6 @@ void CVkProto::WorkerThread(void*)
m_szAccessToken = NULL;
}
-
if (m_szAccessToken != NULL)
// try to receive a response from server
RetrieveMyInfo();