DaanHoogland commented on code in PR #14131:
URL: https://github.com/apache/cloudstack/pull/14131#discussion_r4197572359
##########
server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java:
##########
@@ -2342,6 +2382,9 @@ public LoadBalancer
updateLoadBalancerRule(UpdateLoadBalancerRuleCmd cmd) {
lb.setCidrList(cidrListStr);
}
+ // lb.getId() rather than the id off the command, which is a Long and
unboxes badly
+ boolean settingsChanged =
updateLoadBalancerConnectionSettings(lb.getId(), cmd.getKeepAlive(),
cmd.getIdleTimeout(), cmd.getKeepAliveTimeout());
Review Comment:
if `lbRuleId` is not a valid Long, line 2336 would have not yielded a valid
`lb`. why do you think this is needed?
Also `lb.getId()` does not return a LoadBalancerRuleId but a LoadBalancerId,
which is not as `updateLoadBalancerConnectionSettings` seems to require.
```suggestion
boolean settingsChanged =
updateLoadBalancerConnectionSettings(lbRuleId, cmd.getKeepAlive(),
cmd.getIdleTimeout(), cmd.getKeepAliveTimeout());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]