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:
Miek Gieben
2018-02-28 18:19:37 -08:00
committed by GitHub
parent 6bb08ffee4
commit 4f3dc207a4
6 changed files with 32 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ func (z *Zone) Reload() error {
log.Printf("[INFO] Successfully reloaded zone %q in %q with serial %d", z.origin, z.file, z.Apex.SOA.Serial)
z.Notify()
case <-z.ReloadShutdown:
case <-z.reloadShutdown:
tick.Stop()
return
}