code refactor

This commit is contained in:
Ulric Qin 2022-04-13 20:16:11 +08:00
parent 8e14600321
commit e892e2d2be
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ func (t *Target) LoopGather(r *Redis, queue chan *types.Sample) {
for { for {
select { select {
case <-t.quit: case <-t.quit:
close(t.quit)
return return
default: default:
time.Sleep(t.getInterval(r)) time.Sleep(t.getInterval(r))