diff options
author | 2022-02-14 12:12:08 -0500 | |
---|---|---|
committer | 2022-02-14 12:12:08 -0500 | |
commit | e5626a77bbda8fa4c7526753fe9ab78dc21e3220 (patch) | |
tree | 67fdf2eb98df3e2844a6331c667b7d567827ee4c /plugin | |
parent | 80195c399f632efff5f6ca051057e8629c8bf439 (diff) | |
download | coredns-e5626a77bbda8fa4c7526753fe9ab78dc21e3220.tar.gz coredns-e5626a77bbda8fa4c7526753fe9ab78dc21e3220.tar.zst coredns-e5626a77bbda8fa4c7526753fe9ab78dc21e3220.zip |
plugin/secondary: Fix startup transfer failure wrong zone logged (#5085)
* avoid race
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/secondary/setup.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/secondary/setup.go b/plugin/secondary/setup.go index 9dcd9099b..97d8cd9f5 100644 --- a/plugin/secondary/setup.go +++ b/plugin/secondary/setup.go @@ -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 { |