mirror of
https://github.com/coredns/coredns.git
synced 2025-12-16 23:01:19 +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() {
|
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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user