mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-23 17:31:43 +00:00
ipn/ipnlocal: call restart backend on user changes
This makes it so that the backend also restarts when users change, otherwise an extra call to Start was required. Updates #713 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
8e85227059
commit
b87cb2c4a5
@ -2100,8 +2100,15 @@ func (b *LocalBackend) shouldUploadServices() bool {
|
|||||||
|
|
||||||
func (b *LocalBackend) SetCurrentUserID(uid string) {
|
func (b *LocalBackend) SetCurrentUserID(uid string) {
|
||||||
b.mu.Lock()
|
b.mu.Lock()
|
||||||
b.pm.SetCurrentUser(uid)
|
if b.pm.CurrentUser() == uid {
|
||||||
b.mu.Unlock()
|
b.mu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err := b.pm.SetCurrentUser(uid); err != nil {
|
||||||
|
b.mu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
b.resetForProfileChangeLockedOnEntry()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *LocalBackend) CheckPrefs(p *ipn.Prefs) error {
|
func (b *LocalBackend) CheckPrefs(p *ipn.Prefs) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user