Ensure logging threads exit.
[nssm.git] / service.cpp
index d66b916..937a2ec 100644 (file)
@@ -2060,6 +2060,9 @@ void CALLBACK end_service(void *arg, unsigned char why) {
   service->exit_count++;\r
   (void) nssm_hook(&hook_threads, service, NSSM_HOOK_EVENT_EXIT, NSSM_HOOK_ACTION_POST, NULL, NSSM_HOOK_DEADLINE, true);\r
 \r
+  /* Exit logging threads. */\r
+  cleanup_loggers(service);\r
+\r
   /*\r
     The why argument is true if our wait timed out or false otherwise.\r
     Our wait is infinite so why will never be true when called by the system.\r