diff options
author | ElzorFox <elzorfox@ya.ru> | 2017-04-02 00:11:41 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2017-04-02 00:11:41 +0500 |
commit | a8007991b6f8f5381dd290b44fdcf346f68f48b3 (patch) | |
tree | afa9de4cb46c10a972df04b97d34345e2e5ddd53 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 177bd7053cb265b1634e1a1a2a635ca4a8b72395 (diff) |
VKontakte:
fix treads handle leaks
fix multiply loading history on quick online-offline-online
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 9594480776..a0bf8e7dc7 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -102,8 +102,15 @@ void CVkProto::OnLoggedOut() debugLogA("CVkProto::OnLoggedOut");
m_bOnline = false;
- m_hPollingThread = NULL;
- m_hWorkerThread = NULL;
+ if (m_hPollingThread) {
+ CloseHandle(m_hPollingThread);
+ m_hPollingThread = NULL;
+ }
+
+ if (m_hWorkerThread) {
+ CloseHandle(m_hWorkerThread);
+ m_hWorkerThread = NULL;
+ }
if (m_hAPIConnection)
Netlib_CloseHandle(m_hAPIConnection);
|