From 2bfc079946781325c2b5c9e4e71a04ef2bb3bea1 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Fri, 28 Oct 2022 19:08:50 +0300 Subject: [PATCH] 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. --- lib/isc/netmgr/tlsstream.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/isc/netmgr/tlsstream.c b/lib/isc/netmgr/tlsstream.c index 6b0f8a4968..f8a0bc6dc2 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;