ipn/ipnlocal: prevent deadlock on WebClientShutdown
WebClientShutdown tries to acquire the b.mu lock, so run it in a go routine so that it can finish shutdown after setPrefsLockedOnEntry is finished. This is the same reason b.sshServer.Shutdown is run in a go routine. Updates tailscale/corp#14335 Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
parent
7a725bb4f0
commit
e7482f0df0
|
@ -3013,7 +3013,7 @@ func (b *LocalBackend) setPrefsLockedOnEntry(caller string, newp *ipn.Prefs) ipn
|
|||
}
|
||||
}
|
||||
if oldp.ShouldWebClientBeRunning() && !newp.ShouldWebClientBeRunning() {
|
||||
b.WebClientShutdown()
|
||||
go b.WebClientShutdown()
|
||||
}
|
||||
if netMap != nil {
|
||||
newProfile := netMap.UserProfiles[netMap.User()]
|
||||
|
|
Loading…
Reference in New Issue