Commit 859cab09 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: make DefaultTransport's Dialer enable DualStack ("Happy Eyeballs")

As @pmarks-net said in the bug, this is something of a prisoner's
dilemma, but it does help people who occasionally report problems.

This is temporary. IPv6 is happening regardless of our decision here,
so we'll do this for now.

Fixes #15324

Change-Id: I8cc29c6efa56222970996c71182fc9ee89d78539
Reviewed-on: https://go-review.googlesource.com/28077
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
parent 8e6948fe
......@@ -40,6 +40,7 @@ var DefaultTransport RoundTripper = &Transport{
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
DualStack: true,
}).DialContext,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment