Commit 8c40f5e2 authored by chuwt's avatar chuwt Committed by GitHub

fix: add missing ticker stop (#2433)

parent 9ee31073
......@@ -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)
}
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment