aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/lookup.go
diff options
context:
space:
mode:
authorGravatar marqc <marqc@users.noreply.github.com> 2018-09-29 17:50:49 +0200
committerGravatar Miek Gieben <miek@miek.nl> 2018-09-29 16:50:49 +0100
commit552aab723c05088d049f085ee3b480dac1dbdba7 (patch)
treecd6ecf70b028a1b4412728b967be9d1abd26678c /plugin/file/lookup.go
parenta80ec6096f71337600ff2694040be1efb7b6b87b (diff)
downloadcoredns-552aab723c05088d049f085ee3b480dac1dbdba7.tar.gz
coredns-552aab723c05088d049f085ee3b480dac1dbdba7.tar.zst
coredns-552aab723c05088d049f085ee3b480dac1dbdba7.zip
Configurable zone reload interval in file plugin (#2110)
* Configurable zone reload interval in file plugin * passing reload config from auto plugin to file plugin. removed noReload property from Zone struct. fixed tests based on short file reload hack
Diffstat (limited to 'plugin/file/lookup.go')
-rw-r--r--plugin/file/lookup.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/file/lookup.go b/plugin/file/lookup.go
index 31248f314..d15ff5b6a 100644
--- a/plugin/file/lookup.go
+++ b/plugin/file/lookup.go
@@ -30,11 +30,11 @@ func (z *Zone) Lookup(state request.Request, qname string) ([]dns.RR, []dns.RR,
qtype := state.QType()
do := state.Do()
- if !z.NoReload {
+ if 0 < z.ReloadInterval {
z.reloadMu.RLock()
}
defer func() {
- if !z.NoReload {
+ if 0 < z.ReloadInterval {
z.reloadMu.RUnlock()
}
}()