mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -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:
@@ -38,6 +38,10 @@ func setup(c *caddy.Controller) error {
|
||||
return nil
|
||||
})
|
||||
}
|
||||
for _, n := range zones.Names {
|
||||
z := zones.Z[n]
|
||||
c.OnShutdown(z.OnShutdown)
|
||||
}
|
||||
|
||||
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
|
||||
return File{Next: next, Zones: zones}
|
||||
|
||||
Reference in New Issue
Block a user