2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Merge branch '4064-read-timeout-failure' into 'main'

allow streamdns read to resume after timeout

Closes #4064

See merge request isc-projects/bind9!7921
This commit is contained in:
Evan Hunt 2023-05-15 16:25:45 +00:00
commit 996819b0a3

View File

@ -831,7 +831,7 @@ isc__nm_streamdns_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb,
sock = handle->sock;
REQUIRE(VALID_NMSOCK(sock));
REQUIRE(sock->type == isc_nm_streamdnssocket);
REQUIRE(sock->recv_handle == NULL);
REQUIRE(sock->recv_handle == handle || sock->recv_handle == NULL);
REQUIRE(sock->tid == isc_tid());
closing = streamdns_closing(sock);
@ -839,7 +839,9 @@ isc__nm_streamdns_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb,
sock->recv_cb = cb;
sock->recv_cbarg = cbarg;
sock->reading = true;
if (sock->recv_handle == NULL) {
isc_nmhandle_attach(handle, &sock->recv_handle);
}
/*
* In some cases there is little sense in making the operation