diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 67314c700..f111e5581 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -2259,13 +2259,6 @@ func (c *Conn) Close() error { return err } -// isClosed reports whether c is closed. -func (c *Conn) isClosed() bool { - c.mu.Lock() - defer c.mu.Unlock() - return c.closed -} - func (c *Conn) goroutinesRunningLocked() bool { if c.endpointsUpdateActive { return true @@ -2997,10 +2990,6 @@ func (de *discoEndpoint) heartbeat() { de.heartBeatTimer = nil - if de.c.isClosed() { - return - } - if de.lastSend.IsZero() { // Shouldn't happen. return