mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 10:01:57 +00:00
control/controlclient: use less battery when stopped, stop map requests
Updates #604 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
dd97111d06
commit
a275b9d7aa
@@ -1069,6 +1069,7 @@ func (b *LocalBackend) enterState(newState State) {
|
||||
b.state = newState
|
||||
prefs := b.prefs
|
||||
notify := b.notify
|
||||
bc := b.c
|
||||
b.mu.Unlock()
|
||||
|
||||
if state == newState {
|
||||
@@ -1080,6 +1081,10 @@ func (b *LocalBackend) enterState(newState State) {
|
||||
b.send(Notify{State: &newState})
|
||||
}
|
||||
|
||||
if bc != nil {
|
||||
bc.SetPaused(newState == Stopped)
|
||||
}
|
||||
|
||||
switch newState {
|
||||
case NeedsLogin:
|
||||
b.blockEngineUpdates(true)
|
||||
|
||||
Reference in New Issue
Block a user