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.

(cherry picked from commit 2bfc079946)
This commit is contained in:
Artem Boldariev 2022-10-28 19:08:50 +03:00
parent 66bec1d886
commit c1c22ad69a

View file

@ -835,11 +835,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->mgr, sock);
isc_nmhandle_attach(handle, &uvreq->handle);
uvreq->cb.send = cb;