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

net: make cgo-based DNS resolution respect context cancel #15321

Closed
bradfitz opened this issue Apr 15, 2016 · 5 comments
Closed

net: make cgo-based DNS resolution respect context cancel #15321

bradfitz opened this issue Apr 15, 2016 · 5 comments

Comments

@bradfitz
Copy link
Contributor

We should make cgo-based DNS lookups respect deadline + cancelation via a Context.

See https://go-review.googlesource.com/#/c/22101/2/src/net/lookup_unix.go@70

/cc @ianlancetaylor

@bradfitz bradfitz added this to the Go1.7 milestone Apr 15, 2016
@sctb
Copy link
Contributor

sctb commented May 8, 2016

@bradfitz Is this still desired for 1.7? I'm ready to open a CL if you like.

@mdempsky
Copy link
Member

mdempsky commented May 9, 2016

@sctb How do you propose to fix the issue? It seems non-trivial to me to make getaddrinfo respect deadline/cancellation.

@sctb
Copy link
Contributor

sctb commented May 9, 2016

I can't say I have any magic to interrupt a call to getaddrinfo, but it seems like we can at least make it in a goroutine so we can return to the caller on time. This is what's done in the Windows code.

@bradfitz bradfitz modified the milestones: Go1.7Maybe, Go1.7 May 9, 2016
@bradfitz
Copy link
Contributor Author

bradfitz commented May 9, 2016

@sctb, that sounds fine. Do you want to send a change?

@gopherbot
Copy link

CL https://golang.org/cl/22961 mentions this issue.

@golang golang locked and limited conversation to collaborators May 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants