control/controlclient: reset backoff in mapRoutine on netmap recv

We were never resetting the backoff in streaming mapResponses.
The call to `PollNetMap` always returns with an error. Changing that contract
is harder, so manually reset backoff when a netmap is received.

Updates tailscale/corp#12894

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-07-13 20:45:12 -07:00
committed by Maisem Ali
parent 7aba0b0d78
commit 60e5761d60
2 changed files with 10 additions and 1 deletions

View File

@ -551,6 +551,8 @@ func (c *Auto) mapRoutine() {
if stillAuthed {
c.sendStatus("mapRoutine-got-netmap", nil, "", nm)
}
// Reset the backoff timer if we got a netmap.
bo.BackOff(ctx, nil)
})
health.SetInPollNetMap(false)