mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
control/controlclient: merge, simplify two health check calls
I'm trying to remove some stuff from the netmap update path. Updates #1909 Change-Id: Iad2c728dda160cd52f33ef9cf0b75b4940e0ce64 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
17438a98c0
commit
14320290c3
@@ -489,7 +489,6 @@ type mapRoutineState struct {
|
||||
|
||||
func (mrs mapRoutineState) UpdateFullNetmap(nm *netmap.NetworkMap) {
|
||||
c := mrs.c
|
||||
health.SetInPollNetMap(true)
|
||||
|
||||
c.mu.Lock()
|
||||
ctx := c.mapCtx
|
||||
@@ -561,11 +560,11 @@ func (c *Auto) mapRoutine() {
|
||||
c.logf("[v1] mapRoutine: new map needed while idle.")
|
||||
}
|
||||
} else {
|
||||
health.SetInPollNetMap(false)
|
||||
health.SetOutOfPollNetMap()
|
||||
|
||||
err := c.direct.PollNetMap(ctx, mrs)
|
||||
|
||||
health.SetInPollNetMap(false)
|
||||
health.SetOutOfPollNetMap()
|
||||
c.mu.Lock()
|
||||
c.synced = false
|
||||
if c.state == StateSynchronized {
|
||||
|
Reference in New Issue
Block a user