]> Cypherpunks repositories - gostls13.git/commitdiff
net: enable DualStack mode on Plan 9
authorDavid du Colombier <0intro@gmail.com>
Tue, 19 Apr 2016 01:24:21 +0000 (03:24 +0200)
committerDavid du Colombier <0intro@gmail.com>
Tue, 19 Apr 2016 01:48:44 +0000 (01:48 +0000)
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/22204
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/dial.go

index 59e41f536b2a13e7e57edb9b3fb69e3a026a1e22..3443161004e92c15c6f94749e9d89ec36114db1e 100644 (file)
@@ -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