Skip to content

Make gethostbyaddr fail with ECANCELLED for ares_cancel()#138

Closed
addaleax wants to merge 1 commit intoc-ares:masterfrom
addaleax:cancel-ecancelled
Closed

Make gethostbyaddr fail with ECANCELLED for ares_cancel()#138
addaleax wants to merge 1 commit intoc-ares:masterfrom
addaleax:cancel-ecancelled

Conversation

@addaleax
Copy link
Contributor

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

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
@dimbleby
Copy link
Contributor

If this is correct, then presumably ares_gethostbyname() should have a similar fix here.

@addaleax
Copy link
Contributor Author

@dimbleby I don’t think so, for ares_gethostbyname() the status is already passed along via next_lookup(); I assume there is a reason for that disparity in the first place.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.382% when pulling e8a8637 on addaleax:cancel-ecancelled into 33bf5ba on c-ares:master.

Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this reasoning!

@addaleax
Copy link
Contributor Author

Bump, anything I can do for this to be merged? Should I ping the mailing list?

@bagder bagder closed this in 0ef4a0c Aug 24, 2017
@bagder
Copy link
Member

bagder commented Aug 24, 2017

Thanks!

@addaleax addaleax deleted the cancel-ecancelled branch August 24, 2017 22:14
DronRathore pushed a commit to DronRathore/c-ares that referenced this pull request Mar 11, 2020
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

Closes c-ares#138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants