diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-01 16:16:10 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-01 16:16:10 +0000 |
commit | 01e9ee7d00a4c7d27734ed11b46000be107a1d16 (patch) | |
tree | be003faa1846debbf6febdb1ed2ab36d9539c30e /protocols/VKontakte | |
parent | 2250887d17d5cf4ab4d5fd1465d6081b0dc4698d (diff) |
Vkontakte: fix(?) for silent dead PollServer
git-svn-id: http://svn.miranda-ng.org/main/trunk@10894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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;
}
|