mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
clean up outerhandle when a tcpdns socket is disconnected
this prevents a crash when some non-netmgr thread, such as a recursive lookup, times out after the TCP socket is already disconnected.
This commit is contained in:
@@ -987,6 +987,16 @@ isc__nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr, isc_nmsocket_type type,
|
||||
sock->magic = NMSOCK_MAGIC;
|
||||
}
|
||||
|
||||
void
|
||||
isc__nmsocket_clearcb(isc_nmsocket_t *sock) {
|
||||
REQUIRE(VALID_NMSOCK(sock));
|
||||
|
||||
sock->rcb.recv = NULL;
|
||||
sock->rcbarg = NULL;
|
||||
sock->accept_cb.accept = NULL;
|
||||
sock->accept_cbarg = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
isc__nm_alloc_cb(uv_handle_t *handle, size_t size, uv_buf_t *buf) {
|
||||
isc_nmsocket_t *sock = uv_handle_get_data(handle);
|
||||
|
Reference in New Issue
Block a user