summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_trouter.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-31 13:13:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-31 13:13:13 +0300
commit9437834f8f4d3abf32a8629747385d666c652084 (patch)
tree3756bbc3e4648bf539ab78a891697f9a4e89690f /protocols/SkypeWeb/src/skype_trouter.cpp
parentce8b02d7c3df822605392d3e8e6f817953af0864 (diff)
fixes #1011 (thread-unsafe code in SkypeWeb)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index a34e35c8e9..c5c055e213 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -118,12 +118,12 @@ void CSkypeProto::TRouterThread(void*)
{
debugLogA(__FUNCTION__": entering");
- int errors = 0;
-
- while (!m_bThreadsTerminated) {
-
+ while (true) {
m_hTrouterEvent.Wait();
- errors = 0;
+ if (m_bThreadsTerminated)
+ break;
+
+ int errors = 0;
TrouterPollRequest *request = new TrouterPollRequest(TRouter.socketIo, TRouter.connId, TRouter.st, TRouter.se, TRouter.sig, TRouter.instance, TRouter.ccid, TRouter.sessId);