Skip to content

Commit 296729c

Browse files
addaleaxMylesBorins
authored andcommitted
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: #14814 Fixes: #14814 PR-URL: #15023 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 01846a0 commit 296729c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/cares/src/ares_gethostbyaddr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static void addr_callback(void *arg, int status, int timeouts,
157157
}
158158
end_aquery(aquery, status, host);
159159
}
160-
else if (status == ARES_EDESTRUCTION)
160+
else if (status == ARES_EDESTRUCTION || status == ARES_ECANCELLED)
161161
end_aquery(aquery, status, NULL);
162162
else
163163
next_lookup(aquery);

0 commit comments

Comments
 (0)