ipn/setClientStatus: fix inverted prefsChanged check.

We need to emit Prefs when it *has* changed, not when it hasn't.

Test is added in our e2e test, separately.

Fixes: #620

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun 2020-07-30 04:36:06 -04:00
parent f81233524f
commit 60c00605d3

View File

@ -209,7 +209,7 @@ func (b *LocalBackend) setClientStatus(st controlclient.Status) {
interact := b.interact
if st.Persist != nil {
if b.prefs.Persist.Equals(st.Persist) {
if !b.prefs.Persist.Equals(st.Persist) {
prefsChanged = true
b.prefs.Persist = st.Persist.Clone()
}