ipnlocal: don't pause the controlclient until we get at least one netmap.

Without this, macOS would fail to display its menu state correctly if you
started it while !WantRunning. It relies on the netmap in order to show
the logged-in username.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun
2021-04-30 06:08:26 -04:00
parent 4ef207833b
commit 0181a4d0ac
3 changed files with 10 additions and 4 deletions

View File

@@ -129,6 +129,7 @@ func (c *Auto) SetPaused(paused bool) {
if paused == c.paused {
return
}
c.logf("setPaused(%v)", paused)
c.paused = paused
if paused {
// Only cancel the map routine. (The auth routine isn't expensive
@@ -267,7 +268,7 @@ func (c *Auto) authRoutine() {
if goal != nil {
c.logf("authRoutine: %s; wantLoggedIn=%v", c.state, goal.wantLoggedIn)
} else {
c.logf("authRoutine: %s; goal=nil", c.state)
c.logf("authRoutine: %s; goal=nil paused=%v", c.state, c.paused)
}
c.mu.Unlock()