summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-07-22 19:00:11 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-07-22 19:00:11 +0300
commitfad8f014de1584912a2e2ab022de9e76e937dd24 (patch)
tree9394b7e959d93db079969c8208a4530dc3ec59d7 /protocols/SkypeWeb/src/skype_proto.cpp
parent18db8c6eb17021f64e14406133b2bc38a4f98243 (diff)
fixes #4560 (SkypeWeb: зависание)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index df6ea85f2c..e57ed0c346 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -21,7 +21,6 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) :
PROTO<CSkypeProto>(protoName, userName),
m_PopupClasses(1),
m_OutMessages(3, PtrKeySortT),
- m_bThreadsTerminated(false),
m_impl(*this),
m_requests(1),
bAutoHistorySync(this, "AutoSync", true),
@@ -65,8 +64,9 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) :
CSkypeProto::~CSkypeProto()
{
- StopQueue();
if (m_hRequestQueueThread) {
+ m_hRequestQueueEvent.Set();
+
WaitForSingleObject(m_hRequestQueueThread, INFINITE);
m_hRequestQueueThread = nullptr;
}
@@ -74,6 +74,8 @@ CSkypeProto::~CSkypeProto()
UninitPopups();
if (m_hPollingThread) {
+ m_hPollingEvent.Set();
+
WaitForSingleObject(m_hPollingThread, INFINITE);
m_hPollingThread = nullptr;
}
@@ -91,14 +93,7 @@ void CSkypeProto::OnModulesLoaded()
void CSkypeProto::OnShutdown()
{
- debugLogA(__FUNCTION__);
-
StopQueue();
-
- m_bThreadsTerminated = true;
-
- m_hPollingEvent.Set();
- m_hTrouterEvent.Set();
}
INT_PTR CSkypeProto::GetCaps(int type, MCONTACT)