* The full text indexer now runs in its own dedicated thread instead of
[citadel.git] / citadel / citserver.c
index 473e256b30893675d882b05336a876c63e6e8d99..1e32ea54b5ceca67679346b84a3bd6d76b30c88b 100644 (file)
@@ -148,6 +148,10 @@ void master_cleanup(int exitcode) {
                (*fcn->h_function_pointer)();
        }
 
+       /* Shut down the indexer thread */
+       lprintf(CTDL_INFO, "Waiting for the indexer thread to shut down\n");
+       pthread_join(indexer_thread_tid, NULL);
+
        /* Close databases */
        lprintf(CTDL_INFO, "Closing databases\n");
        close_databases();