From f3e2b6563784df0a8abe2bdfbbedf14ed2a72cce Mon Sep 17 00:00:00 2001 From: Dmytro Shynkevych Date: Thu, 16 Jul 2020 11:04:53 -0400 Subject: [PATCH] wgengine/magicsock: time.Sleep -> time.After Signed-off-by: Dmytro Shynkevych --- wgengine/magicsock/magicsock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 8bc5147e2..e9158aa32 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -1138,7 +1138,7 @@ func (c *Conn) runDerpReader(ctx context.Context, derpFakeAddr netaddr.IPPort, d case <-ctx.Done(): return // Avoid excessive spinning. - case <-time.Sleep(250 * time.Millisecond): + case <-time.After(250 * time.Millisecond): } continue }