src/server/daemon/webserver.c

changeset 577
4f5ccaea4a92
parent 576
5c31cc844c68
equal deleted inserted replaced
576:5c31cc844c68 577:4f5ccaea4a92
289 cfgmgr_shutdown(); 289 cfgmgr_shutdown();
290 shutdown_threadpools(60); 290 shutdown_threadpools(60);
291 291
292 shutdown_eventhandlers_wait(); // TODO: timeout 292 shutdown_eventhandlers_wait(); // TODO: timeout
293 293
294 shutdown_logging();
295
294 // execute restart callbacks 296 // execute restart callbacks
295 RestartCallback *re = atrestart; 297 RestartCallback *re = atrestart;
296 RestartCallback *re_next; 298 RestartCallback *re_next;
297 while(re) { 299 while(re) {
298 re->func(re->data); 300 re->func(re->data);
351 353
352 resource_pool_cleanup(); 354 resource_pool_cleanup();
353 func_cleanup(); 355 func_cleanup();
354 356
355 ServerConfiguration *scfg = cfgmgr_get_server_config(); 357 ServerConfiguration *scfg = cfgmgr_get_server_config();
356 CxIterator i = cxListIterator(scfg->logfiles); 358 CxIterator i = cxListIterator(scfg->listeners);
357 cx_foreach(AccessLog *, logfile, i) { 359 cx_foreach(HttpListener *, ls, i) {
358 fclose(logfile->log->file); 360 http_listener_destroy(ls);
359 } 361 }
360 pool_destroy(scfg->pool); 362 pool_destroy(scfg->pool);
363
364 http_listener_global_shutdown();
361 365
362 free(pwbuf); 366 free(pwbuf);
363 } 367 }
364 368
365 int nsapi_runtime_version() { 369 int nsapi_runtime_version() {

mercurial