diff --git a/src/sbbs3/websrvr.c b/src/sbbs3/websrvr.c index 63c6dd839c23d0e513ca6d66490c817bb8a5a725..2cc684acfa0a75eb358b0d707535ae89f55a8795 100644 --- a/src/sbbs3/websrvr.c +++ b/src/sbbs3/websrvr.c @@ -6533,6 +6533,7 @@ static void cleanup(int code) lprintf(LOG_INFO,"0000 Waiting for %d child threads to terminate", protected_uint32_value(thread_count)-1); while(protected_uint32_value(thread_count) > 1) { mswait(100); + listSemPost(&log_list); } lprintf(LOG_INFO,"0000 Done waiting"); } @@ -6620,7 +6621,7 @@ void http_logging_thread(void* arg) lprintf(LOG_INFO,"HTTP logging thread started"); - for(;;) { + while(!terminate_http_logging_thread) { struct log_data *ld; char timestr[128]; char sizestr[100]; @@ -7086,6 +7087,7 @@ void DLLCALL web_server(void* arg) "terminate"); break; } + listSemPost(&log_list); mswait(100); } lprintf(LOG_INFO, "Done waiting for HTTP logging thread to terminate");