plugin/hosts: fix ticker leak in golang (#5690)
This commit is contained in:
parent
4ae811ad96
commit
c61e8f3dbc
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ func periodicHostsUpdate(h *Hosts) chan bool {
|
|||
|
||||
go func() {
|
||||
ticker := time.NewTicker(h.options.reload)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-parseChan:
|
||||
|
|
Loading…
Add table
Reference in a new issue