plugin/route53: fix multiple route 53 zones issue (#2117)

This commit is contained in:
Can Yucel 2018-09-22 05:26:17 -07:00 committed by Miek Gieben
parent 1697ab359d
commit b3d69f1c7f
2 changed files with 3 additions and 3 deletions

View file

@ -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.