mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
ipn/ipnlocal: plumb health.Tracker into profileManager constructor
Setting the field after-the-fact wasn't working because we could migrate prefs on creation, which would set health status for auto updates. Updates #11986 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I41d79ebd61d64829a3a9e70586ce56f62d24ccfd
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e42c4396cf
commit
e9505e5432
@@ -364,11 +364,10 @@ func NewLocalBackend(logf logger.Logf, logID logid.PublicID, sys *tsd.System, lo
|
||||
if loginFlags&controlclient.LocalBackendStartKeyOSNeutral != 0 {
|
||||
goos = ""
|
||||
}
|
||||
pm, err := newProfileManagerWithGOOS(store, logf, goos)
|
||||
pm, err := newProfileManagerWithGOOS(store, logf, sys.HealthTracker(), goos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pm.health = sys.HealthTracker()
|
||||
if sds, ok := store.(ipn.StateStoreDialerSetter); ok {
|
||||
sds.SetDialer(dialer.SystemDial)
|
||||
}
|
||||
|
Reference in New Issue
Block a user