aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/reload.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/file/reload.go')
-rw-r--r--plugin/file/reload.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugin/file/reload.go b/plugin/file/reload.go
index 79db040fe..426a986b0 100644
--- a/plugin/file/reload.go
+++ b/plugin/file/reload.go
@@ -3,10 +3,12 @@ package file
import (
"os"
"time"
+
+ "github.com/coredns/coredns/plugin/transfer"
)
// Reload reloads a zone when it is changed on disk. If z.NoReload is true, no reloading will be done.
-func (z *Zone) Reload() error {
+func (z *Zone) Reload(t *transfer.Transfer) error {
if z.ReloadInterval == 0 {
return nil
}
@@ -40,7 +42,11 @@ func (z *Zone) Reload() error {
z.Unlock()
log.Infof("Successfully reloaded zone %q in %q with %d SOA serial", z.origin, zFile, z.Apex.SOA.Serial)
- z.Notify()
+ if t != nil {
+ if err := t.Notify(z.origin); err != nil {
+ log.Warningf("Failed sending notifies: %s", err)
+ }
+ }
case <-z.reloadShutdown:
tick.Stop()