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


##########
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)

Review Comment:
   nit - comment not required.



##########
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxy.java:
##########
@@ -307,6 +376,7 @@ public static void startWithContext(Properties conf, Object 
context, byte[] ksBi
         try {
             final ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
             Class<?> contextClazz = 
loader.loadClass("com.cloud.agent.resource.consoleproxy.ConsoleProxyResource");
+            // 4.20 signature: 7 parameters

Review Comment:
   nit: remove comment



##########
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxy.java:
##########
@@ -220,33 +276,39 @@ public static ConsoleProxyAuthenticationResult 
authenticateConsoleAccess(Console
             return authResult;
         }
 
+
         String websocketUrl = param.getWebsocketUrl();
         if (StringUtils.isNotBlank(websocketUrl)) {
             return authResult;
         }
 
+
         if (standaloneStart) {
             return authResult;
         }
 
+
         if (authMethod != null) {
             Object result;
             try {
+                // 4.20: authenticateConsoleAccess(host, port, vmId, sid, 
ticket, isReauthentication, sessionToken)

Review Comment:
   nit: can we remove this comment or remove the 4.20 reference?



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