From: Artem Boldariev Date: Thu, 27 Oct 2022 18:16:36 +0000 (+0300) Subject: TLS Stream: use ISC_R_CANCELLED error when shutting down X-Git-Tag: v9.19.8~28^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef659365ce789a68f82478217e2398d8aebea668;p=thirdparty%2Fbind9.git TLS Stream: use ISC_R_CANCELLED error when shutting down This commit changes ISC_R_NOTCONNECTED error code to ISC_R_CANCELLED when attempting to start reading data on the shutting down socket in order to make its behaviour compatible with that of TCP and not break the common code in the unit tests. --- diff --git a/lib/isc/netmgr/tlsstream.c b/lib/isc/netmgr/tlsstream.c index 355920c5e08..6b0f8a4968e 100644 --- a/lib/isc/netmgr/tlsstream.c +++ b/lib/isc/netmgr/tlsstream.c @@ -864,7 +864,7 @@ isc__nm_tls_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg) { REQUIRE(sock->tid == isc_tid()); if (inactive(sock)) { - cb(handle, ISC_R_NOTCONNECTED, NULL, cbarg); + cb(handle, ISC_R_CANCELED, NULL, cbarg); return; }