Skip to content

Commit

Permalink
Add missing timer reset
Browse files Browse the repository at this point in the history
  • Loading branch information
angrycub committed Nov 3, 2022
1 parent ca06227 commit 17b024e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/15134.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cleanup: fixed missing timer.Reset for plan queue stat emitter
```
2 changes: 2 additions & 0 deletions nomad/plan_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ func (q *PlanQueue) EmitStats(period time.Duration, stopCh <-chan struct{}) {
defer stop()

for {
timer.Reset(period)

select {
case <-timer.C:
stats := q.Stats()
Expand Down

0 comments on commit 17b024e

Please sign in to comment.