diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-22 14:57:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-22 14:57:50 +0000 |
commit | c650e1e172dd9131dfcb17948113935d805c0dfb (patch) | |
tree | bf41aa11a434407715f40e50e0a4050d421f8781 /plugins/Clist_modern/src/modern_awaymsg.cpp | |
parent | bdf88550d1e2807a9c719259385917ba3d0dd91e (diff) |
trying to catch hung thread in clist_modern
git-svn-id: http://svn.miranda-ng.org/main/trunk@11582 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_awaymsg.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_awaymsg.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index adba1130a3..d98489d9cc 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -76,7 +76,7 @@ static MCONTACT amGetCurrentChain() */
static void amThreadProc(void *)
{
- thread_catcher lck(g_hAwayMsgThread);
+ Netlib_Logf(NULL, "amThreadProc thread start");
ClcCacheEntry dnce;
memset(&dnce, 0, sizeof(dnce));
@@ -88,7 +88,7 @@ static void amThreadProc(void *) if ((time - amRequestTick) < AMASKPERIOD) {
SleepEx(AMASKPERIOD - (time - amRequestTick) + 10, TRUE);
if (MirandaExiting())
- return;
+ goto LBL_Exit;
}
CListSettings_FreeCacheItemData(&dnce);
dnce.hContact = hContact;
@@ -120,13 +120,17 @@ static void amThreadProc(void *) }
else break;
if (MirandaExiting())
- return;
+ goto LBL_Exit;
}
WaitForSingleObjectEx(hamProcessEvent, INFINITE, TRUE);
ResetEvent(hamProcessEvent);
if (MirandaExiting())
break;
}
+
+LBL_Exit:
+ g_hAwayMsgThread = NULL;
+ Netlib_Logf(NULL, "amThreadProc thread end");
}
BOOL amWakeThread()
|