Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make gethostbyaddr fail with ECANCELLED for ares_cancel() #138

Closed
wants to merge 1 commit into from

Conversation

@addaleax
Copy link
Contributor

@addaleax addaleax commented Aug 14, 2017

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

@dimbleby dimbleby commented Aug 14, 2017

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

@addaleax
Copy link
Contributor Author

@addaleax addaleax commented Aug 14, 2017

@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

@coveralls coveralls commented Aug 14, 2017

Coverage Status

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

bagder
bagder approved these changes Aug 14, 2017
Copy link
Member

@bagder bagder left a comment

I agree with this reasoning!

@addaleax
Copy link
Contributor Author

@addaleax addaleax commented Aug 24, 2017

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 bagder commented Aug 24, 2017

Thanks!

@addaleax addaleax deleted the cancel-ecancelled branch Aug 24, 2017
DronRathore added a commit to DronRathore/c-ares that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants