mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 14:57:49 +00:00
ipn: fix race in enterState
Signed-Off-By: Dmytro Shynkevych <dmytro@tailscale.com>
This commit is contained in:
parent
53fb25fc2f
commit
00ca17edf4
@ -920,6 +920,7 @@ func wgCIDRToNetaddr(cidrs []wgcfg.CIDR) (ret []netaddr.IPPrefix) {
|
||||
func (b *LocalBackend) enterState(newState State) {
|
||||
b.mu.Lock()
|
||||
state := b.state
|
||||
b.state = newState
|
||||
prefs := b.prefs
|
||||
notify := b.notify
|
||||
b.mu.Unlock()
|
||||
@ -933,7 +934,6 @@ func (b *LocalBackend) enterState(newState State) {
|
||||
b.send(Notify{State: &newState})
|
||||
}
|
||||
|
||||
b.state = newState
|
||||
switch newState {
|
||||
case NeedsLogin:
|
||||
b.blockEngineUpdates(true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user