--- a/src/server/daemon/webserver.c Fri Jan 31 21:27:54 2025 +0100 +++ b/src/server/daemon/webserver.c Sat Feb 01 09:23:14 2025 +0100 @@ -291,6 +291,8 @@ shutdown_eventhandlers_wait(); // TODO: timeout + shutdown_logging(); + // execute restart callbacks RestartCallback *re = atrestart; RestartCallback *re_next; @@ -353,12 +355,14 @@ func_cleanup(); ServerConfiguration *scfg = cfgmgr_get_server_config(); - CxIterator i = cxListIterator(scfg->logfiles); - cx_foreach(AccessLog *, logfile, i) { - fclose(logfile->log->file); + CxIterator i = cxListIterator(scfg->listeners); + cx_foreach(HttpListener *, ls, i) { + http_listener_destroy(ls); } pool_destroy(scfg->pool); + http_listener_global_shutdown(); + free(pwbuf); }