From 01e9ee7d00a4c7d27734ed11b46000be107a1d16 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Sat, 1 Nov 2014 16:16:10 +0000 Subject: Vkontakte: fix(?) for silent dead PollServer git-svn-id: http://svn.miranda-ng.org/main/trunk@10894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index a29d2d11d9..2dd4d70a00 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -940,9 +940,14 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates) int CVkProto::PollServer() { debugLogA("CVkProto::PollServer"); - if (!IsOnline()) - return 0; + if (!IsOnline()){ + debugLogA("CVkProto::PollServer is dead (not online)"); + m_pollingConn = NULL; + ShutdownSession(); + return 0; + } + debugLogA("CVkProto::PollServer (online)"); NETLIBHTTPREQUEST req = { sizeof(req) }; req.requestType = REQUEST_GET; req.szUrl = NEWSTR_ALLOCA(CMStringA().Format("http://%s?act=a_check&key=%s&ts=%s&wait=25&access_token=%s&mode=%d", m_pollingServer, m_pollingKey, m_pollingTs, m_szAccessToken, 106)); @@ -989,6 +994,7 @@ int CVkProto::PollServer() m_pollingConn = reply->nlc; CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)reply); + debugLogA("CVkProto::PollServer return %d", retVal); return retVal; } -- cgit v1.2.3