mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
plugin/secondary: Fix startup transfer failure wrong zone logged (#5085)
* avoid race Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -23,7 +23,8 @@ func setup(c *caddy.Controller) error {
|
||||
}
|
||||
|
||||
// Add startup functions to retrieve the zone and keep it up to date.
|
||||
for _, n := range zones.Names {
|
||||
for i := range zones.Names {
|
||||
n := zones.Names[i]
|
||||
z := zones.Z[n]
|
||||
if len(z.TransferFrom) > 0 {
|
||||
c.OnStartup(func() error {
|
||||
|
||||
Reference in New Issue
Block a user