diff options
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index ec26804c2c..2b19032c5c 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -522,7 +522,13 @@ int CVkProto::PollServer() int retVal = 0;
if (reply->resultCode == 200) {
JSONROOT pRoot(reply->pData);
- if ( CheckJsonResult(NULL, reply, pRoot)) {
+ JSONNODE *pFailed = json_get(pRoot, "failed");
+ if (pFailed != NULL && json_as_int(pFailed) == 2) {
+ RetrievePollingInfo();
+ retVal = -1;
+ debugLogA("Polling key expired, restarting polling thread");
+ }
+ else if ( CheckJsonResult(NULL, reply, pRoot)) {
m_pollingTs = mir_t2a( ptrT( json_as_string( json_get(pRoot, "ts"))));
JSONNODE *pUpdates = json_get(pRoot, "updates");
if (pUpdates != NULL)
|