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/22127
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
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 {
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 {