Commit f9474299 authored by David du Colombier's avatar David du Colombier

net: enable DualStack mode on Plan 9

DualStack mode requires dialTCP to support cancellation,
which has been implemented for Plan 9 in CL 22144.

Updates #11225.
Updates #11932.

Change-Id: I6e468363dc147326b097b604c122d5af80362787
Reviewed-on: https://go-review.googlesource.com/22204Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 4331ab97
......@@ -6,7 +6,6 @@ package net
import (
"context"
"runtime"
"time"
)
......@@ -325,10 +324,8 @@ func (d *Dialer) DialContext(ctx context.Context, network, address string) (Conn
address: address,
}
// DualStack mode requires that dialTCP support cancelation. This is
// not available on plan9 (golang.org/issue/11225), so we ignore it.
var primaries, fallbacks addrList
if d.DualStack && network == "tcp" && runtime.GOOS != "plan9" {
if d.DualStack && network == "tcp" {
primaries, fallbacks = addrs.partition(isIPv4)
} else {
primaries = addrs
......
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