2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Fix error codes passed to connection callbacks

Commit 9ee60e7a17 erroneously introduced
duplicate conditions to several existing conditional statements
responsible for determining error codes passed to connection callbacks
upon failure.  Fix the affected expressions to ensure connection
callbacks are invoked with:

  - the ISC_R_SHUTTINGDOWN error code when a global netmgr shutdown is
    in progress,

  - the ISC_R_CANCELED error code when a specific operation has been
    canceled.

This does not fix any known bugs, it only adjusts the changes introduced
by commit 9ee60e7a17 so that they match
its original intent.
This commit is contained in:
Michał Kępień
2021-12-28 15:09:50 +01:00
parent cb22ed0492
commit ea89ab80ae
3 changed files with 3 additions and 3 deletions

View File

@@ -247,7 +247,7 @@ tcp_connect_cb(uv_connect_t *uvreq, int status) {
*/
isc__nm_uvreq_put(&req, sock);
return;
} else if (isc__nmsocket_closing(sock)) {
} else if (isc__nm_closing(sock)) {
/* Network manager shutting down */
result = ISC_R_SHUTTINGDOWN;
goto error;

View File

@@ -214,7 +214,7 @@ tcpdns_connect_cb(uv_connect_t *uvreq, int status) {
REQUIRE(VALID_UVREQ(req));
REQUIRE(VALID_NMHANDLE(req->handle));
if (isc__nmsocket_closing(sock)) {
if (isc__nm_closing(sock)) {
/* Network manager shutting down */
result = ISC_R_SHUTTINGDOWN;
goto error;

View File

@@ -230,7 +230,7 @@ tlsdns_connect_cb(uv_connect_t *uvreq, int status) {
REQUIRE(VALID_UVREQ(req));
REQUIRE(VALID_NMHANDLE(req->handle));
if (isc__nmsocket_closing(sock)) {
if (isc__nm_closing(sock)) {
/* Network manager shutting down */
result = ISC_R_SHUTTINGDOWN;
goto error;