mirror of
https://github.com/coredns/coredns.git
synced 2025-12-15 22:31:42 +01:00
plugin/hosts: fix ticker leak in golang (#5690)
This commit is contained in:
parent
4ae811ad96
commit
c61e8f3dbc
@ -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…
x
Reference in New Issue
Block a user