Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
deps: cherry-pick 0ef4a0c64b6 from c-ares upstream
Browse files Browse the repository at this point in the history
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: nodejs/node#14814

Fixes: nodejs/node#14814

PR-URL: nodejs/node#15023
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
addaleax authored and Olivia Hugger committed Aug 30, 2017
1 parent 27038ec commit 76627ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/cares/src/ares_gethostbyaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 76627ee

Please sign in to comment.