From 9b553da079817f83fe7659696d5a88b60724463d Mon Sep 17 00:00:00 2001 From: Ace Eldeib Date: Mon, 17 Jun 2019 19:26:16 -0700 Subject: [PATCH] fix: infinite loop in SKU iteration (#229) --- .../azure/services/availabilityzones/availabilityzones.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cloud/azure/services/availabilityzones/availabilityzones.go b/pkg/cloud/azure/services/availabilityzones/availabilityzones.go index bddfb58e66f..c348c6d675a 100644 --- a/pkg/cloud/azure/services/availabilityzones/availabilityzones.go +++ b/pkg/cloud/azure/services/availabilityzones/availabilityzones.go @@ -75,6 +75,10 @@ func (s *Service) Get(ctx context.Context, spec v1alpha1.ResourceSpec) (interfac } } } + err = res.NextWithContext(ctx) + if err != nil { + return zones, errors.Wrap(err, "could not iterate availability zones") + } } return zones, nil