control/controlclient: remove unused reference to mapCtx (#17614)

Updates #cleanup

Signed-off-by: James Sanderson <jsanderson@tailscale.com>
pull/17642/head
James 'zofrex' Sanderson 1 month ago committed by GitHub
parent adee8b9180
commit b6c6960e40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -433,7 +433,6 @@ func (mrs mapRoutineState) UpdateFullNetmap(nm *netmap.NetworkMap) {
c := mrs.c
c.mu.Lock()
ctx := c.mapCtx
c.inMapPoll = true
if c.loggedIn {
c.state = StateSynchronized
@ -447,7 +446,7 @@ func (mrs mapRoutineState) UpdateFullNetmap(nm *netmap.NetworkMap) {
c.sendStatus("mapRoutine-got-netmap", nil, "", nm)
}
// Reset the backoff timer if we got a netmap.
mrs.bo.BackOff(ctx, nil)
mrs.bo.Reset()
}
func (mrs mapRoutineState) UpdateNetmapDelta(muts []netmap.NodeMutation) bool {

@ -78,3 +78,9 @@ func (b *Backoff) BackOff(ctx context.Context, err error) {
case <-tChannel:
}
}
// Reset resets the backoff schedule, equivalent to calling BackOff with a nil
// error.
func (b *Backoff) Reset() {
b.n = 0
}

Loading…
Cancel
Save