summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_pollserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_pollserver.cpp')
-rw-r--r--protocols/VKontakte/src/vk_pollserver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp
index 372a73e92f..e4a3b5524b 100644
--- a/protocols/VKontakte/src/vk_pollserver.cpp
+++ b/protocols/VKontakte/src/vk_pollserver.cpp
@@ -211,6 +211,7 @@ int CVkProto::PollServer()
}
else {
debugLogA("CVkProto::PollServer => ShutdownSession");
+ m_hPollingThread = NULL;
ShutdownSession();
return 0;
}
@@ -256,7 +257,7 @@ void CVkProto::PollingThread(void*)
debugLogA("CVkProto::PollingThread: entering");
while (!m_bTerminated)
- if (PollServer() == -1)
+ if (PollServer() == -1 || !m_hPollingThread)
break;
m_hPollingThread = NULL;