newTransport(): remove deprecated DualStack option
The `DualStack` option was deprecated in Go 1.12, and is now enabled by default (through commit github.com/golang/go@efc185029bf770894defe63cec2c72a4c84b2ee9). > The Dialer.DualStack field is now meaningless and documented as deprecated. > > To disable fallback, set FallbackDelay to a negative value. The default `FallbackDelay` is 300ms; to make this more explicit, this patch sets `FallbackDelay` to the default value. Note that Docker Hub currently does not support IPv6 (DNS for registry-1.docker.io has no AAAA records, so we should not hit the 300ms delay). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
51261876f0
commit
c96373f6d5
@ -425,9 +425,9 @@ func newTransport() *http.Transport {
|
|||||||
return &http.Transport{
|
return &http.Transport{
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
DialContext: (&net.Dialer{
|
DialContext: (&net.Dialer{
|
||||||
Timeout: 30 * time.Second,
|
Timeout: 30 * time.Second,
|
||||||
KeepAlive: 30 * time.Second,
|
KeepAlive: 30 * time.Second,
|
||||||
DualStack: true,
|
FallbackDelay: 300 * time.Millisecond,
|
||||||
}).DialContext,
|
}).DialContext,
|
||||||
MaxIdleConns: 10,
|
MaxIdleConns: 10,
|
||||||
IdleConnTimeout: 30 * time.Second,
|
IdleConnTimeout: 30 * time.Second,
|
||||||
|
Loading…
Reference in New Issue
Block a user