Skip to content

Commit 01cb864

Browse files
committed
fix: integrated review findings
1 parent 885fe11 commit 01cb864

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

services/alb/wait/wait.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func CreateOrUpdateLoadbalancerWaitHandler(ctx context.Context, client APIClient
3535
case StatusPending:
3636
return false, nil, nil
3737
case StatusUnspecified:
38-
return true, response, nil
38+
return false, nil, nil
3939
case StatusError:
4040
return true, response, fmt.Errorf("loadbalancer in error: %s", *response.Status)
4141
default:
@@ -51,15 +51,15 @@ func CreateOrUpdateLoadbalancerWaitHandler(ctx context.Context, client APIClient
5151

5252
func DeleteLoadbalancerWaitHandler(ctx context.Context, client APIClientLoadbalancerInterface, projectId, region, name string) *wait.AsyncActionHandler[alb.LoadBalancer] {
5353
handler := wait.New(func() (bool, *alb.LoadBalancer, error) {
54-
loadBalancer, err := client.GetLoadBalancerExecute(ctx, projectId, region, name)
54+
_, err := client.GetLoadBalancerExecute(ctx, projectId, region, name)
5555
if err != nil {
5656
var apiErr *oapierror.GenericOpenAPIError
5757
if errors.As(err, &apiErr) {
5858
if statusCode := apiErr.StatusCode; statusCode == http.StatusNotFound || statusCode == http.StatusGone {
59-
return true, loadBalancer, nil
59+
return true, nil, nil
6060
}
6161
}
62-
return true, loadBalancer, err
62+
return true, nil, err
6363
}
6464
return false, nil, nil
6565
})

0 commit comments

Comments
 (0)