mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Change the isc__nm_tcpdns_stoplistening() to be asynchronous event
The isc__nm_tcpdns_stoplistening() would call isc__nmsocket_clearcb() that would clear the .accept_cb from non-netmgr thread. Change the tcpdns_stoplistening to enqueue ievent that would get processed in the right netmgr thread to avoid locking.
This commit is contained in:
@@ -536,12 +536,11 @@ error:
|
||||
|
||||
void
|
||||
isc__nm_tcp_stoplistening(isc_nmsocket_t *sock) {
|
||||
isc__netievent_tcpstop_t *ievent = NULL;
|
||||
|
||||
REQUIRE(VALID_NMSOCK(sock));
|
||||
REQUIRE(!isc__nm_in_netthread());
|
||||
REQUIRE(sock->type == isc_nm_tcplistener);
|
||||
|
||||
ievent = isc__nm_get_ievent(sock->mgr, netievent_tcpstop);
|
||||
isc__netievent_tcpstop_t *ievent =
|
||||
isc__nm_get_ievent(sock->mgr, netievent_tcpstop);
|
||||
isc__nmsocket_attach(sock, &ievent->sock);
|
||||
isc__nm_enqueue_ievent(&sock->mgr->workers[sock->tid],
|
||||
(isc__netievent_t *)ievent);
|
||||
|
Reference in New Issue
Block a user