mirror of
https://github.com/coredns/coredns.git
synced 2025-12-08 19:35:10 -05: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:
9
plugin/file/shutdown.go
Normal file
9
plugin/file/shutdown.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package file
|
||||
|
||||
// OnShutdown shuts down any running go-routines for this zone.
|
||||
func (z *Zone) OnShutdown() error {
|
||||
if !z.NoReload {
|
||||
z.reloadShutdown <- true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user