@@ -434,8 +434,8 @@ func (cp *CloudProvider) updateBackendSet(ctx context.Context, lbID string, acti
434
434
func (cp * CloudProvider ) updateListener (ctx context.Context , lbID string , action * ListenerAction , ports portSpec , lbSubnets , nodeSubnets []* core.Subnet , sourceCIDRs []string ) error {
435
435
var workRequestID string
436
436
var err error
437
- l := action .Listener
438
- ports .ListenerPort = * l .Port
437
+ listener := action .Listener
438
+ ports .ListenerPort = * listener .Port
439
439
440
440
glog .V (2 ).Infof ("Applying %q action on listener %q for lb %q (ports=%+v)" , action .Type (), action .Name (), lbID , ports )
441
441
@@ -446,14 +446,14 @@ func (cp *CloudProvider) updateListener(ctx context.Context, lbID string, action
446
446
return err
447
447
}
448
448
449
- workRequestID , err = cp .client .LoadBalancer ().CreateListener (ctx , lbID , action .Name (), l )
449
+ workRequestID , err = cp .client .LoadBalancer ().CreateListener (ctx , lbID , action .Name (), listener )
450
450
case Update :
451
451
err = cp .securityListManager .Update (ctx , lbSubnets , nodeSubnets , sourceCIDRs , nil , ports )
452
452
if err != nil {
453
453
return err
454
454
}
455
455
456
- workRequestID , err = cp .client .LoadBalancer ().UpdateListener (ctx , lbID , action .Name (), l )
456
+ workRequestID , err = cp .client .LoadBalancer ().UpdateListener (ctx , lbID , action .Name (), listener )
457
457
case Delete :
458
458
err = cp .securityListManager .Delete (ctx , lbSubnets , nodeSubnets , ports )
459
459
if err != nil {
0 commit comments