From 6bc15f3a735d9e44bbcdade01d9d6e57a8771fd9 Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Mon, 4 Sep 2023 11:21:51 -0700 Subject: [PATCH] ipn/ipnlocal: fix startIsNoopLocked It got broken back when FUS was introduced, but we never caught it. Updates tailscale/corp#14471 Signed-off-by: Maisem Ali --- ipn/ipnlocal/local.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index ac2605b04..4e559f6d0 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -1324,7 +1324,7 @@ func (b *LocalBackend) Start(opts ipn.Options) error { // but meanwhile we can make Start cheaper here for such a // case and not restart the world (which takes a few seconds). // Instead, just send a notify with the state that iOS needs. - if b.startIsNoopLocked(opts) && profileID == b.lastProfileID { + if b.startIsNoopLocked(opts) && profileID == b.lastProfileID && profileID != "" { b.logf("Start: already running; sending notify") nm := b.netMap state := b.state @@ -4011,6 +4011,7 @@ func (b *LocalBackend) setNetMapLocked(nm *netmap.NetworkMap) { if login != b.activeLogin { b.logf("active login: %v", login) b.activeLogin = login + b.lastProfileID = b.pm.CurrentProfile().ID } b.pauseOrResumeControlClientLocked()