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.
This commit is contained in:
Artem Boldariev 2022-10-28 19:08:50 +03:00
parent ef659365ce
commit 2bfc079946

View 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;