ipn, wgengine/magicsock: be more idle when in Stopped state with no peers
(Previously as #288, but with some more.) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -698,6 +698,7 @@ func (b *LocalBackend) enterState(newState State) {
|
||||
state := b.state
|
||||
prefs := b.prefs
|
||||
notify := b.notify
|
||||
c := b.c
|
||||
b.mu.Unlock()
|
||||
|
||||
if state == newState {
|
||||
@@ -719,6 +720,9 @@ func (b *LocalBackend) enterState(newState State) {
|
||||
if err != nil {
|
||||
b.logf("Reconfig(down): %v", err)
|
||||
}
|
||||
if c != nil {
|
||||
c.Shutdown()
|
||||
}
|
||||
case Starting, NeedsMachineAuth:
|
||||
b.authReconfig()
|
||||
// Needed so that UpdateEndpoints can run
|
||||
|
||||
Reference in New Issue
Block a user