health, ipn/ipnlocal: track, log overall health

Updates #1505

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-03-15 22:20:48 -07:00
committed by Brad Fitzpatrick
parent 6fbc9b3a98
commit 9eb65601ef
3 changed files with 131 additions and 35 deletions

View File

@ -179,8 +179,11 @@ func NewNoStart(opts Options) (*Client, error) {
}
func (c *Client) onHealthChange(key string, err error) {
c.logf("controlclient: restarting map request for %q health change to new state: %v", key, err)
func (c *Client) onHealthChange(sys health.Subsystem, err error) {
if sys == health.SysOverall {
return
}
c.logf("controlclient: restarting map request for %q health change to new state: %v", sys, err)
c.cancelMapSafely()
}