cmd/tailscale: make tailscale status -active also filter in -json mode

This commit is contained in:
Brad Fitzpatrick
2020-07-15 09:27:48 -07:00
parent 19867b2b6d
commit 7ba148e54e
2 changed files with 18 additions and 3 deletions

View File

@@ -526,6 +526,8 @@ func (b *LocalBackend) send(n Notify) {
if notify != nil {
n.Version = version.LONG
notify(n)
} else {
b.logf("nil notify callback; dropping %+v", n)
}
}
@@ -1037,7 +1039,7 @@ func (b *LocalBackend) RequestEngineStatus() {
// RequestStatus implements Backend.
func (b *LocalBackend) RequestStatus() {
st := b.Status()
b.notify(Notify{Status: st})
b.send(Notify{Status: st})
}
// stateMachine updates the state machine state based on other things