Skip to content

Commit

Permalink
fix: add missing ticker stop (#2433)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuwt authored Aug 23, 2021
1 parent 9ee3107 commit 8c40f5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/tags/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (t *Tag) Get(state State) int64 {
return atomic.LoadInt64(v)
}

// GetTotal returns the total count
// TotalCounter returns the total count
func (t *Tag) TotalCounter() int64 {
return atomic.LoadInt64(&t.Total)
}
Expand All @@ -169,6 +169,8 @@ func (t *Tag) WaitTillDone(ctx context.Context, s State) error {
return nil
}
ticker := time.NewTicker(100 * time.Millisecond)
defer ticker.Stop()

for {
select {
case <-ticker.C:
Expand Down

0 comments on commit 8c40f5e

Please sign in to comment.