mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Synchronise stop listening operation for multi-layer transports
This commit introduces a primitive isc__nmsocket_stop() which performs shutting down on a multilayered socket ensuring the proper order of the operations. The shared data within the socket object can be destroyed after the call completed, as it is guaranteed to not be used from within the context of other worker threads.
This commit is contained in:
@@ -155,7 +155,7 @@ isc_nm_listenudp(isc_nm_t *mgr, uint32_t workers, isc_sockaddr_t *iface,
|
||||
sock->children = isc_mem_getx(worker->mctx, children_size,
|
||||
ISC_MEM_ZERO);
|
||||
|
||||
isc_barrier_init(&sock->barrier, sock->nchildren);
|
||||
isc__nmsocket_barrier_init(sock);
|
||||
|
||||
sock->recv_cb = cb;
|
||||
sock->recv_cbarg = cbarg;
|
||||
|
Reference in New Issue
Block a user