mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -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:
@@ -29,7 +29,7 @@ type Zone struct {
|
||||
|
||||
NoReload bool
|
||||
reloadMu sync.RWMutex
|
||||
ReloadShutdown chan bool
|
||||
reloadShutdown chan bool
|
||||
Upstream upstream.Upstream // Upstream for looking up names during the resolution process
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func NewZone(name, file string) *Zone {
|
||||
file: path.Clean(file),
|
||||
Tree: &tree.Tree{},
|
||||
Expired: new(bool),
|
||||
ReloadShutdown: make(chan bool),
|
||||
reloadShutdown: make(chan bool),
|
||||
}
|
||||
*z.Expired = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user