diff options
author | 2018-09-22 05:26:17 -0700 | |
---|---|---|
committer | 2018-09-22 13:26:17 +0100 | |
commit | b3d69f1c7f226805e7f70cfd0e88b488dc2eab1b (patch) | |
tree | 3f1c520f7a827672bb166ccf39ee11e3bffb68ad /plugin | |
parent | 1697ab359d28e1af271ba8e41012c318b7846562 (diff) | |
download | coredns-b3d69f1c7f226805e7f70cfd0e88b488dc2eab1b.tar.gz coredns-b3d69f1c7f226805e7f70cfd0e88b488dc2eab1b.tar.zst coredns-b3d69f1c7f226805e7f70cfd0e88b488dc2eab1b.zip |
plugin/route53: fix multiple route 53 zones issue (#2117)
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/route53/route53.go | 4 | ||||
-rw-r--r-- | plugin/route53/route53_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugin/route53/route53.go b/plugin/route53/route53.go index 58d4335c4..affa3e3de 100644 --- a/plugin/route53/route53.go +++ b/plugin/route53/route53.go @@ -140,7 +140,7 @@ func (h *Route53) updateZones(ctx context.Context) error { errc := make(chan error) defer close(errc) for zName, z := range h.zones { - go func(zName string) { + go func(zName string, z *zone) { var err error defer func() { errc <- err @@ -170,7 +170,7 @@ func (h *Route53) updateZones(ctx context.Context) error { h.zMu.Lock() z.z = newZ h.zMu.Unlock() - }(zName) + }(zName, z) } // Collect errors (if any). This will also sync on all zones updates // completion. diff --git a/plugin/route53/route53_test.go b/plugin/route53/route53_test.go index 519b211a4..a358386d4 100644 --- a/plugin/route53/route53_test.go +++ b/plugin/route53/route53_test.go @@ -71,7 +71,7 @@ func TestRoute53(t *testing.T) { t.Fatalf("Expected errors for zone bad.") } - r, err = New(ctx, fakeRoute53{}, map[string]string{"org.": "1234567890"}, &upstream.Upstream{}) + r, err = New(ctx, fakeRoute53{}, map[string]string{"org.": "1234567890", "gov.": "Z098765432"}, &upstream.Upstream{}) if err != nil { t.Fatalf("Failed to create Route53: %v", err) } |