mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
control/controlclient: make Status.Persist a PersistView
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -818,10 +818,10 @@ func (b *LocalBackend) setClientStatus(st controlclient.Status) {
|
||||
prefs.ControlURL = prefs.ControlURLOrDefault()
|
||||
prefsChanged = true
|
||||
}
|
||||
if st.Persist != nil {
|
||||
if !prefs.Persist.Equals(st.Persist) {
|
||||
if st.Persist != nil && st.Persist.Valid() {
|
||||
if !prefs.Persist.View().Equals(*st.Persist) {
|
||||
prefsChanged = true
|
||||
prefs.Persist = st.Persist.Clone()
|
||||
prefs.Persist = st.Persist.AsStruct()
|
||||
}
|
||||
}
|
||||
if st.URL != "" {
|
||||
|
@@ -139,10 +139,11 @@ func (cc *mockControl) populateKeys() (newKeys bool) {
|
||||
// (In our tests here, upstream is the ipnlocal.Local instance.)
|
||||
func (cc *mockControl) send(err error, url string, loginFinished bool, nm *netmap.NetworkMap) {
|
||||
if cc.statusFunc != nil {
|
||||
pv := cc.persist.View()
|
||||
s := controlclient.Status{
|
||||
URL: url,
|
||||
NetMap: nm,
|
||||
Persist: cc.persist,
|
||||
Persist: &pv,
|
||||
Err: err,
|
||||
}
|
||||
if loginFinished {
|
||||
|
Reference in New Issue
Block a user