]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TLS stream: always handle send callbacks asynchronously
authorArtem Boldariev <artem@boldariev.com>
Fri, 28 Oct 2022 16:08:50 +0000 (19:08 +0300)
committerArtem Boldariev <artem@boldariev.com>
Wed, 30 Nov 2022 16:09:52 +0000 (18:09 +0200)
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

index 6b0f8a4968eded802f193e4d2c97321937cbe309..f8a0bc6dc2bedfa2168831e67d66128f75441160 100644 (file)
@@ -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;