]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
* There is now a dedicated thread for doing database checkpoints.
[citadel.git] / citadel / citserver.c
index 473e256b30893675d882b05336a876c63e6e8d99..85f593641318e9bfdc56e7f1c72cf0ea5401ce6d 100644 (file)
@@ -148,6 +148,14 @@ 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);
+
+       /* Shut down the checkpoint thread */
+       lprintf(CTDL_INFO, "Waiting for the checkpoint thread to shut down\n");
+       pthread_join(checkpoint_thread_tid, NULL);
+
        /* Close databases */
        lprintf(CTDL_INFO, "Closing databases\n");
        close_databases();