mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
ipn/ipnlocal: remove redundant notify nil check
send does it. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
d9ee9a0d3f
commit
7c0e58c537
@ -1837,7 +1837,6 @@ func (b *LocalBackend) enterState(newState ipn.State) {
|
|||||||
state := b.state
|
state := b.state
|
||||||
b.state = newState
|
b.state = newState
|
||||||
prefs := b.prefs
|
prefs := b.prefs
|
||||||
notify := b.notify
|
|
||||||
cc := b.cc
|
cc := b.cc
|
||||||
networkUp := b.prevIfState.AnyInterfaceUp()
|
networkUp := b.prevIfState.AnyInterfaceUp()
|
||||||
activeLogin := b.activeLogin
|
activeLogin := b.activeLogin
|
||||||
@ -1850,9 +1849,7 @@ func (b *LocalBackend) enterState(newState ipn.State) {
|
|||||||
b.logf("Switching ipn state %v -> %v (WantRunning=%v)",
|
b.logf("Switching ipn state %v -> %v (WantRunning=%v)",
|
||||||
state, newState, prefs.WantRunning)
|
state, newState, prefs.WantRunning)
|
||||||
health.SetIPNState(newState.String(), prefs.WantRunning)
|
health.SetIPNState(newState.String(), prefs.WantRunning)
|
||||||
if notify != nil {
|
b.send(ipn.Notify{State: &newState})
|
||||||
b.send(ipn.Notify{State: &newState})
|
|
||||||
}
|
|
||||||
|
|
||||||
if cc != nil {
|
if cc != nil {
|
||||||
cc.SetPaused(newState == ipn.Stopped || !networkUp)
|
cc.SetPaused(newState == ipn.Stopped || !networkUp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user