mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
plugin/hosts: fix ticker leak in golang (#5690)
This commit is contained in:
@@ -26,6 +26,7 @@ func periodicHostsUpdate(h *Hosts) chan bool {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
ticker := time.NewTicker(h.options.reload)
|
ticker := time.NewTicker(h.options.reload)
|
||||||
|
defer ticker.Stop()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-parseChan:
|
case <-parseChan:
|
||||||
|
|||||||
Reference in New Issue
Block a user