mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
Reset timer to zero when no progress notify was sent
This commit is contained in:
parent
544ea42482
commit
98e384fcd0
@ -95,15 +95,16 @@ func (pr *conditionalProgressRequester) Run(stopCh <-chan struct{}) {
|
||||
|
||||
select {
|
||||
case <-timer.C():
|
||||
timer.Reset(progressRequestPeriod)
|
||||
shouldRequest := func() bool {
|
||||
pr.mux.Lock()
|
||||
defer pr.mux.Unlock()
|
||||
return pr.waiting > 0 && !pr.stopped
|
||||
}()
|
||||
if !shouldRequest {
|
||||
timer.Reset(0)
|
||||
continue
|
||||
}
|
||||
timer.Reset(progressRequestPeriod)
|
||||
err := pr.requestWatchProgress(ctx)
|
||||
if err != nil {
|
||||
klog.V(4).InfoS("Error requesting bookmark", "err", err)
|
||||
|
Loading…
Reference in New Issue
Block a user