Revert "wgengine/magicsock: shortcircuit discoEndpoint.heartbeat when its connection is closed"

This reverts commit 08baa17d9a.
It caused deadlocks due to lock ordering violations.
It was not the right fix, and thus should simply be reverted
while we look for the right fix (if we haven't already found it
in the interim; we've fixed other logging-after-test issues).

Fixes #1161
pull/1168/head
Josh Bleecher Snyder 3 years ago
parent e4c075cd95
commit 5fe5402fcd

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

Loading…
Cancel
Save