diff --git a/src/zm_logger.cpp b/src/zm_logger.cpp index f236f17a3..dd03ec9f2 100644 --- a/src/zm_logger.cpp +++ b/src/zm_logger.cpp @@ -570,7 +570,6 @@ void logInit(const char *name, const Logger::Options &options) { } void logTerm() { - dbQueue.stop(); if (Logger::smInstance) { delete Logger::smInstance; Logger::smInstance = nullptr; diff --git a/src/zmc.cpp b/src/zmc.cpp index ff84304af..c2ee0a071 100644 --- a/src/zmc.cpp +++ b/src/zmc.cpp @@ -382,6 +382,7 @@ int main(int argc, char *argv[]) { Image::Deinitialise(); Debug(1, "terminating"); logTerm(); + dbQueue.stop(); zmDbClose(); return zm_terminate ? 0 : result; diff --git a/src/zms.cpp b/src/zms.cpp index ec998920f..d98f24418 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -342,6 +342,7 @@ int main(int argc, const char *argv[], char **envp) { Debug(1, "Terminating"); Image::Deinitialise(); logTerm(); + dbQueue.stop(); zmDbClose(); return 0;