mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
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() {
|
if oldp.ShouldWebClientBeRunning() && !newp.ShouldWebClientBeRunning() {
|
||||||
b.WebClientShutdown()
|
go b.WebClientShutdown()
|
||||||
}
|
}
|
||||||
if netMap != nil {
|
if netMap != nil {
|
||||||
newProfile := netMap.UserProfiles[netMap.User()]
|
newProfile := netMap.UserProfiles[netMap.User()]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user