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

Comments

Projects
None yet
4 participants
@bradfitz
Copy link
Member

commented Apr 15, 2016

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

This comment has been minimized.

Copy link
Contributor

commented May 8, 2016

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

@mdempsky

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member Author

commented May 9, 2016

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

@gopherbot

This comment has been minimized.

Copy link

commented May 9, 2016

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

@gopherbot gopherbot closed this in 636670b May 10, 2016

@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.
You can’t perform that action at this time.