mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
plugin/file: shutdown reload goroutine (#1571)
* plugin/file: shutdown reload goroutine Shutdown the z.Reload() routine (if started in the first place) on shutdow and reload. Fixes #1508 * Must be put in c.OnShutdown() * up test coverage
This commit is contained in:
@@ -60,8 +60,8 @@ func (z *Zones) Add(zo *file.Zone, name string) {
|
||||
func (z *Zones) Remove(name string) {
|
||||
z.Lock()
|
||||
|
||||
if zo, ok := z.Z[name]; ok && !zo.NoReload {
|
||||
zo.ReloadShutdown <- true
|
||||
if zo, ok := z.Z[name]; ok {
|
||||
zo.OnShutdown()
|
||||
}
|
||||
|
||||
delete(z.Z, name)
|
||||
|
||||
Reference in New Issue
Block a user