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

Stop using deprecated net.Dialer.DualStack #3520

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions js/initcontext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ func TestRequestWithBinaryFile(t *testing.T) {
net.Dialer{
Timeout: 10 * time.Second,
KeepAlive: 60 * time.Second,
DualStack: true,
},
netext.NewResolver(net.LookupIP, 0, types.DNSfirst, types.DNSpreferIPv4),
)).DialContext,
Expand Down Expand Up @@ -507,7 +506,6 @@ func TestRequestWithMultipleBinaryFiles(t *testing.T) {
net.Dialer{
Timeout: 10 * time.Second,
KeepAlive: 60 * time.Second,
DualStack: true,
},
netext.NewResolver(net.LookupIP, 0, types.DNSfirst, types.DNSpreferIPv4),
)).DialContext,
Expand Down
1 change: 0 additions & 1 deletion js/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func NewFromBundle(piState *lib.TestPreInitState, b *Bundle) (*Runner, error) {
BaseDialer: net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
DualStack: true,
},
console: newConsole(piState.Logger),
Resolver: netext.NewResolver(
Expand Down
1 change: 0 additions & 1 deletion lib/netext/httpext/error_codes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ func getHTTP2ServerWithCustomConnContext(t *testing.T) *httpmultibin.HTTPMultiBi
dialer := netext.NewDialer(net.Dialer{
Timeout: 2 * time.Second,
KeepAlive: 10 * time.Second,
DualStack: true,
}, netext.NewResolver(net.LookupIP, 0, types.DNSfirst, types.DNSpreferIPv4))
dialer.Hosts, err = types.NewHosts(map[string]types.Host{
http2Domain: *http2DomainValue,
Expand Down
6 changes: 3 additions & 3 deletions lib/netext/httpext/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (t *Tracer) GetConn(_ string) {

// ConnectStart is called when a new connection's Dial begins.
// If net.Dialer.DualStack (IPv6 "Happy Eyeballs") support is
// enabled, this may be called multiple times.
// enabled (default), this may be called multiple times.
//
// If the connection is reused, this won't be called. Otherwise,
// it will be called after GetConn() and before ConnectDone().
Expand All @@ -203,9 +203,9 @@ func (t *Tracer) ConnectStart(_, _ string) {

// ConnectDone is called when a new connection's Dial
// completes. The provided err indicates whether the
// connection completedly successfully.
// connection completed successfully.
// If net.Dialer.DualStack ("Happy Eyeballs") support is
// enabled, this may be called multiple times.
// enabled (default), this may be called multiple times.
//
// If the connection is reused, this won't be called. Otherwise,
// it will be called after ConnectStart() and before either
Expand Down
3 changes: 1 addition & 2 deletions lib/testutils/httpmultibin/httpmultibin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package httpmultibin is indended only for use in tests, do not import in production code!
// Package httpmultibin is intended only for use in tests, do not import in production code!
package httpmultibin

import (
Expand Down Expand Up @@ -350,7 +350,6 @@ func NewHTTPMultiBin(t testing.TB) *HTTPMultiBin {
dialer := netext.NewDialer(net.Dialer{
Timeout: 2 * time.Second,
KeepAlive: 10 * time.Second,
DualStack: true,
}, netext.NewResolver(net.LookupIP, 0, types.DNSfirst, types.DNSpreferIPv4))
dialer.Hosts, err = types.NewHosts(map[string]types.Host{
httpDomain: *httpDomainValue,
Expand Down