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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp
index cc1a75b1fc..adaaaaaf83 100644
--- a/protocols/VKontakte/src/vk_pollserver.cpp
+++ b/protocols/VKontakte/src/vk_pollserver.cpp
@@ -265,7 +265,11 @@ void CVkProto::PollingThread(void*)
if (PollServer() == -1 || !m_hPollingThread)
break;
- m_hPollingThread = NULL;
m_pollingConn = NULL;
debugLogA("CVkProto::PollingThread: leaving");
+
+ if (m_hPollingThread) {
+ CloseHandle(m_hPollingThread);
+ m_hPollingThread = NULL;
+ }
} \ No newline at end of file