]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TLS Stream: use ISC_R_CANCELLED error when shutting down
authorArtem Boldariev <artem@boldariev.com>
Thu, 27 Oct 2022 18:16:36 +0000 (21:16 +0300)
committerArtem Boldariev <artem@boldariev.com>
Wed, 30 Nov 2022 16:09:52 +0000 (18:09 +0200)
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.

lib/isc/netmgr/tlsstream.c

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