From d23e775ae29ef4e434d204bcb2ddb0a3cfe5e4e0 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Thu, 20 Oct 2011 21:27:43 +0530 Subject: [PATCH] fix threading bug. Main thread's restart TV code waiting on a failed TV. Now main thread sets the de_init flag before waiting on the failed thread. Thanks to Eric Leblond for reporting it --- src/tm-threads.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tm-threads.c b/src/tm-threads.c index 7ab3964e9e..a244b79172 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -1729,6 +1729,7 @@ void TmThreadCheckThreadState(void) while (tv) { if (TmThreadsCheckFlag(tv, THV_FAILED)) { + TmThreadsSetFlag(tv, THV_DEINIT); pthread_join(tv->t, NULL); if (tv_aof & THV_ENGINE_EXIT || tv->aof & THV_ENGINE_EXIT) { EngineKill();