diff options
Diffstat (limited to 'llgo/third_party/gofrontend/libgo/go/net/dial.go')
-rw-r--r-- | llgo/third_party/gofrontend/libgo/go/net/dial.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/llgo/third_party/gofrontend/libgo/go/net/dial.go b/llgo/third_party/gofrontend/libgo/go/net/dial.go index 93569c253cd..e6f0436cdd3 100644 --- a/llgo/third_party/gofrontend/libgo/go/net/dial.go +++ b/llgo/third_party/gofrontend/libgo/go/net/dial.go @@ -118,9 +118,8 @@ func resolveAddr(op, net, addr string, deadline time.Time) (netaddr, error) { // "unixpacket". // // For TCP and UDP networks, addresses have the form host:port. -// If host is a literal IPv6 address or host name, it must be enclosed -// in square brackets as in "[::1]:80", "[ipv6-host]:http" or -// "[ipv6-host%zone]:80". +// If host is a literal IPv6 address it must be enclosed +// in square brackets as in "[::1]:80" or "[ipv6-host%zone]:80". // The functions JoinHostPort and SplitHostPort manipulate addresses // in this form. // @@ -214,14 +213,12 @@ func dialMulti(net, addr string, la Addr, ras addrList, deadline time.Time) (Con nracers := len(ras) for nracers > 0 { sig <- true - select { - case racer := <-lane: - if racer.error == nil { - return racer.Conn, nil - } - lastErr = racer.error - nracers-- + racer := <-lane + if racer.error == nil { + return racer.Conn, nil } + lastErr = racer.error + nracers-- } return nil, lastErr } |