wgengine/magicsock: time.Sleep -> time.After

Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
This commit is contained in:
Dmytro Shynkevych 2020-07-16 11:04:53 -04:00
parent 380ee76d00
commit f3e2b65637
No known key found for this signature in database
GPG Key ID: FF5E2F3DAD97EA23

View File

@ -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
}