548
}
549
551
>
w.lock.Lock()
552
>
defer w.lock.Unlock()
553
>
554
>
w.stopWorkerLocked()
555
>
w.retrier.Reset()
556
>
// Note that we only reset reserved here, not in stopWorkerLocked: if we did it there, we
557
>
// would take a rate limiter token on each retry after failure. Failure to start the worker
558
>
// means we probably didn't do any polls yet, which is the main reason for the rate limit,
559
>
// so this it's okay to use only the backoff timer in that case.
560
>
w.reserved = false
561
>
if w.retryTimer != nil {
562
w.retryTimer.Stop()
563
w.retryTimer = nil