From d31eff8473ff4498b49ef9bbdd47910ccbe31a6a Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 23 Mar 2021 11:55:28 -0700 Subject: [PATCH] tstest/natlab: use net.ErrClosed We are now on 1.16. And wgconn.NetErrClosed has been removed upstream. Signed-off-by: Josh Bleecher Snyder --- tstest/natlab/natlab.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tstest/natlab/natlab.go b/tstest/natlab/natlab.go index df2611be4..2d3f3ae70 100644 --- a/tstest/natlab/natlab.go +++ b/tstest/natlab/natlab.go @@ -26,7 +26,6 @@ import ( "sync" "time" - wgconn "github.com/tailscale/wireguard-go/conn" "inet.af/netaddr" ) @@ -759,8 +758,7 @@ func (c *conn) canRead() error { c.mu.Lock() defer c.mu.Unlock() if c.closed { - // TODO: when we switch to Go 1.16, replace this with net.ErrClosed - return wgconn.NetErrClosed + return net.ErrClosed } if !c.readDeadline.IsZero() && c.readDeadline.Before(time.Now()) { return errors.New("read deadline exceeded")