khos2ow commented on a change in pull request #2762: Make HTTP handler of
embedded server to be configured
URL: https://github.com/apache/cloudstack/pull/2762#discussion_r204501339
##########
File path: client/src/main/java/org/apache/cloudstack/ServerDaemon.java
##########
@@ -163,11 +171,13 @@ public void start() throws Exception {
httpConfig.setSendDateHeader(false);
// HTTP Connector
- final ServerConnector httpConnector = new ServerConnector(server, new
HttpConnectionFactory(httpConfig));
- httpConnector.setPort(httpPort);
- httpConnector.setHost(bindInterface);
- httpConnector.setIdleTimeout(30000);
- server.addConnector(httpConnector);
+ if (httpEnable) {
+ final ServerConnector httpConnector = new ServerConnector(server,
new HttpConnectionFactory(httpConfig));
Review comment:
I totally understand and agree with your point but I still don't think it
applies here, these lines are basically all adjusting and configuring one
logical _thing_ (embedded server) and separating them to smaller methods won't
give any additional testability, documentation is a different thing which in
this particular case a simple `// one liner comment` would be enough IMO.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services