diff options
author | 2018-02-28 18:19:37 -0800 | |
---|---|---|
committer | 2018-02-28 18:19:37 -0800 | |
commit | 4f3dc207a46a29edd0f36b9242ce59a6c7e104d0 (patch) | |
tree | 698274f29cd2a7f911d9bd363d5e92ee01c0c5db /plugin/file/zone.go | |
parent | 6bb08ffee446573c8f401160fa7830ffacca8530 (diff) | |
download | coredns-4f3dc207a46a29edd0f36b9242ce59a6c7e104d0.tar.gz coredns-4f3dc207a46a29edd0f36b9242ce59a6c7e104d0.tar.zst coredns-4f3dc207a46a29edd0f36b9242ce59a6c7e104d0.zip |
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
Diffstat (limited to 'plugin/file/zone.go')
-rw-r--r-- | plugin/file/zone.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/file/zone.go b/plugin/file/zone.go index 3447a942c..da294ed45 100644 --- a/plugin/file/zone.go +++ b/plugin/file/zone.go @@ -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 |