DaanHoogland commented on code in PR #13058:
URL: https://github.com/apache/cloudstack/pull/13058#discussion_r3765990687


##########
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxy.java:
##########
@@ -144,36 +170,61 @@ private static void configProxy(Properties conf) {
             factoryClzName = ConsoleProxyBaseServerFactoryImpl.class.getName();
         }
 
-        s = conf.getProperty("consoleproxy.httpCmdListenPort");
+
+        s = conf != null ? conf.getProperty("consoleproxy.httpCmdListenPort") 
: null;
         if (s != null) {
             httpCmdListenPort = Integer.parseInt(s);
             LOGGER.info("Setting httpCmdListenPort=" + s);
         }
 
-        s = conf.getProperty("consoleproxy.reconnectMaxRetry");
+
+        s = conf != null ? conf.getProperty("consoleproxy.reconnectMaxRetry") 
: null;
         if (s != null) {
             reconnectMaxRetry = Integer.parseInt(s);
             LOGGER.info("Setting reconnectMaxRetry=" + reconnectMaxRetry);
         }
 
-        s = conf.getProperty("consoleproxy.readTimeoutSeconds");
+
+        s = conf != null ? conf.getProperty("consoleproxy.readTimeoutSeconds") 
: null;
         if (s != null) {
             readTimeoutSeconds = Integer.parseInt(s);
             LOGGER.info("Setting readTimeoutSeconds=" + readTimeoutSeconds);
         }
 
-        s = conf.getProperty("consoleproxy.defaultBufferSize");
+
+        s = conf != null ? conf.getProperty("consoleproxy.defaultBufferSize") 
: null;
         if (s != null) {
             defaultBufferSize = Integer.parseInt(s);
             LOGGER.info("Setting defaultBufferSize=" + defaultBufferSize);
         }
+
+        // New: read consoleproxy.session.timeout (milliseconds)
+        s = conf != null ? conf.getProperty("consoleproxy.session.timeout") : 
null;
+        if (s != null) {
+            try {
+                int value = Integer.parseInt(s);

Review Comment:
   ```suggestion
                   long value = Long.parseLong(s);
   ```



-- 
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]

Reply via email to