summaryrefslogtreecommitdiff
path: root/deps/cares
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-08-14 18:12:30 +0200
committerJames M Snell <jasnell@gmail.com>2017-08-29 09:51:44 -0700
commita26be6866b0d63ee0a7f59cdbfb608193c7bcd79 (patch)
treed5bb6d51519a156b191a2a5e34229f68a6c74317 /deps/cares
parent4218f1974d3945cd4d675b5bc5292d88b993f9b8 (diff)
downloadandroid-node-v8-a26be6866b0d63ee0a7f59cdbfb608193c7bcd79.tar.gz
android-node-v8-a26be6866b0d63ee0a7f59cdbfb608193c7bcd79.tar.bz2
android-node-v8-a26be6866b0d63ee0a7f59cdbfb608193c7bcd79.zip
deps: cherry-pick 0ef4a0c64b6 from c-ares upstream
Original commit message: gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()` When `ares_cancel()` was invoked, `ares_gethostbyaddr()` queries would fail with `ENOTFOUND` instead of `ECANCELLED`. It seems appropriate to treat `ares_cancel()` like `ares_destroy()`, but I would appreciate review of the correctness of this change. Ref: https://github.com/nodejs/node/issues/14814 Fixes: https://github.com/nodejs/node/issues/14814 PR-URL: https://github.com/nodejs/node/pull/15023 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/cares')
-rw-r--r--deps/cares/src/ares_gethostbyaddr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/cares/src/ares_gethostbyaddr.c b/deps/cares/src/ares_gethostbyaddr.c
index 9258919a38..a0a90f6bb1 100644
--- a/deps/cares/src/ares_gethostbyaddr.c
+++ b/deps/cares/src/ares_gethostbyaddr.c
@@ -157,7 +157,7 @@ static void addr_callback(void *arg, int status, int timeouts,
}
end_aquery(aquery, status, host);
}
- else if (status == ARES_EDESTRUCTION)
+ else if (status == ARES_EDESTRUCTION || status == ARES_ECANCELLED)
end_aquery(aquery, status, NULL);
else
next_lookup(aquery);