Commit 318da8d6 authored by David du Colombier's avatar David du Colombier

net: ignore lack of deadline support on Plan 9

Since CL 22101, network tests are failing on Plan 9
due to the lack of deadline support.

Instead of panicking, we just ignore the deadline
when set.

Update #11932.
Fixes #15328.

Change-Id: I1399303b0b3d6d81e0b8b8d327980d978b411a46
Reviewed-on: https://go-review.googlesource.com/22127Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 002c69e0
......@@ -23,7 +23,7 @@ func dialTCP(ctx context.Context, net string, laddr, raddr *TCPAddr) (*TCPConn,
func doDialTCP(ctx context.Context, net string, laddr, raddr *TCPAddr) (*TCPConn, error) {
if d, _ := ctx.Deadline(); !d.IsZero() {
panic("net.dialTCP: deadline not implemented on Plan 9")
// TODO: deadline not implemented on Plan 9 (see golang.og/issue/11932)
}
// TODO(bradfitz,0intro): also use the cancel channel.
switch net {
......
......@@ -57,7 +57,7 @@ func (c *UDPConn) writeMsg(b, oob []byte, addr *UDPAddr) (n, oobn int, err error
func dialUDP(ctx context.Context, net string, laddr, raddr *UDPAddr) (*UDPConn, error) {
if deadline, _ := ctx.Deadline(); !deadline.IsZero() {
panic("net.dialUDP: deadline not implemented on Plan 9")
// TODO: deadline not implemented on Plan 9 (see golang.og/issue/11932)
}
fd, err := dialPlan9(net, laddr, raddr)
if err != nil {
......
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