diff options
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_gettextasync.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp index 23e6a7f9dd..82f90e95fa 100644 --- a/plugins/Clist_modern/src/modern_gettextasync.cpp +++ b/plugins/Clist_modern/src/modern_gettextasync.cpp @@ -69,6 +69,8 @@ static BOOL gtaGetItem(GTACHAINITEM *mpChain) static void gtaThreadProc(void*)
{
+ Netlib_Logf(NULL, "GTA thread start");
+
thread_catcher lck(g_hGetTextAsyncThread);
SHORTDATA data = { 0 };
@@ -76,7 +78,7 @@ static void gtaThreadProc(void*) Sync(CLUI_SyncGetShortData, (WPARAM)pcli->hwndContactTree, (LPARAM)&data);
while (true) {
if (MirandaExiting())
- return;
+ goto LBL_Exit;
SleepEx(0, TRUE); //1000 contacts per second
@@ -93,7 +95,7 @@ static void gtaThreadProc(void*) dat = &dat2;
}
if (MirandaExiting())
- return;
+ goto LBL_Exit;
ClcCacheEntry cacheEntry;
memset(&cacheEntry, 0, sizeof(cacheEntry));
@@ -112,9 +114,11 @@ static void gtaThreadProc(void*) WaitForSingleObjectEx(hgtaWakeupEvent, INFINITE, TRUE);
ResetEvent(hgtaWakeupEvent);
}
-
+
+LBL_Exit:
CloseHandle(hgtaWakeupEvent);
hgtaWakeupEvent = NULL;
+ Netlib_Logf(NULL, "GTA thread end");
}
BOOL gtaWakeThread()
|