Commit e5626a77 authored by Chris O'Haver's avatar Chris O'Haver Committed by GitHub

plugin/secondary: Fix startup transfer failure wrong zone logged (#5085)

* avoid race
Signed-off-by: default avatarChris O'Haver <cohaver@infoblox.com>
parent 80195c39
...@@ -23,7 +23,8 @@ func setup(c *caddy.Controller) error { ...@@ -23,7 +23,8 @@ func setup(c *caddy.Controller) error {
} }
// Add startup functions to retrieve the zone and keep it up to date. // 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] z := zones.Z[n]
if len(z.TransferFrom) > 0 { if len(z.TransferFrom) > 0 {
c.OnStartup(func() error { c.OnStartup(func() error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment