mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Merge branch '4085-httpd-shutdown-issue' into 'main'
don't set SHUTTINGDOWN until after calling the request callbacks Closes #4085 See merge request isc-projects/bind9!7961
This commit is contained in:
@@ -940,15 +940,17 @@ isc_httpdmgr_shutdown(isc_httpdmgr_t **httpdmgrp) {
|
|||||||
isc_nm_stoplistening(httpdmgr->sock);
|
isc_nm_stoplistening(httpdmgr->sock);
|
||||||
|
|
||||||
LOCK(&httpdmgr->lock);
|
LOCK(&httpdmgr->lock);
|
||||||
httpdmgr->flags |= ISC_HTTPDMGR_SHUTTINGDOWN;
|
|
||||||
|
|
||||||
isc_httpd_t *httpd, *next;
|
isc_httpd_t *httpd = NULL, *next = NULL;
|
||||||
ISC_LIST_FOREACH_SAFE (httpdmgr->running, httpd, link, next) {
|
ISC_LIST_FOREACH_SAFE (httpdmgr->running, httpd, link, next) {
|
||||||
if (httpd->handle != NULL) {
|
if (httpd->handle != NULL) {
|
||||||
httpd_request(httpd->handle, ISC_R_SUCCESS, NULL,
|
httpd_request(httpd->handle, ISC_R_SUCCESS, NULL,
|
||||||
httpd);
|
httpd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
httpdmgr->flags |= ISC_HTTPDMGR_SHUTTINGDOWN;
|
||||||
|
|
||||||
UNLOCK(&httpdmgr->lock);
|
UNLOCK(&httpdmgr->lock);
|
||||||
|
|
||||||
isc_nmsocket_close(&httpdmgr->sock);
|
isc_nmsocket_close(&httpdmgr->sock);
|
||||||
|
Reference in New Issue
Block a user