From: Artem Boldariev Date: Fri, 28 Oct 2022 16:08:50 +0000 (+0300) Subject: TLS stream: always handle send callbacks asynchronously X-Git-Tag: v9.19.8~28^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bfc079946781325c2b5c9e4e71a04ef2bb3bea1;p=thirdparty%2Fbind9.git TLS stream: always handle send callbacks asynchronously This commit ensures that send callbacks are always called from within the context of its worker thread even in the case of shuttigdown/inactive socket, just like TCP transport does and with which TLS attempts to be as compatible as possible. --- diff --git a/lib/isc/netmgr/tlsstream.c b/lib/isc/netmgr/tlsstream.c index 6b0f8a4968e..f8a0bc6dc2b 100644 --- a/lib/isc/netmgr/tlsstream.c +++ b/lib/isc/netmgr/tlsstream.c @@ -833,11 +833,6 @@ isc__nm_tls_send(isc_nmhandle_t *handle, const isc_region_t *region, REQUIRE(sock->type == isc_nm_tlssocket); - if (inactive(sock)) { - cb(handle, ISC_R_CANCELED, cbarg); - return; - } - uvreq = isc__nm_uvreq_get(sock->worker, sock); isc_nmhandle_attach(handle, &uvreq->handle); uvreq->cb.send = cb;