2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

netmgr: actively close all sockets when shutting down server

without this change, named could sometimes lag for a while on shutdown
while it waited for open TCP connections to time out.
This commit is contained in:
Witold Kręcicki
2019-11-22 14:13:19 +01:00
committed by Evan Hunt
parent 37354ee225
commit d6c5052f7e
3 changed files with 56 additions and 6 deletions

View File

@@ -688,3 +688,10 @@ isc__nm_async_tcpclose(isc__networker_t *worker, isc__netievent_t *ievent0) {
tcp_close_direct(ievent->sock);
}
void
isc__nm_tcp_shutdown(isc_nmsocket_t *sock) {
REQUIRE(VALID_NMSOCK(sock));
sock->rcb.recv(sock->tcphandle, NULL, sock->rcbarg);
}