plugin/route53: fix multiple route 53 zones issue (#2117)
This commit is contained in:
parent
1697ab359d
commit
b3d69f1c7f
2 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue