mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
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
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user