net/http: How can I cancel a Dial in net/http/Transport DialContext or "how can http client use only tcp6." #28464
Labels
Comments
I'm closing this issue. Please use a forum, where there will be more people who can help you. See https://golang.org/wiki/Questions . Thanks. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I create my own DialContext because want I to detect if a domain is ipv6-only. code below
What did you expect to see?
I want to cancel the request if domain can not connect via IPv6.
What did you see instead?
I do not now how to close the request even when I can enter
network == "ipv4"
.addition
Python can solve the question via https://stackoverflow.com/questions/33046733/force-requests-to-use-ipv4-ipv6. I do not know how to do it in golang. Could someone one help me?
Thanks so much!
The text was updated successfully, but these errors were encountered: