Pearl1594 commented on code in PR #13683:
URL: https://github.com/apache/cloudstack/pull/13683#discussion_r3646658011
##########
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxy.java:
##########
@@ -209,13 +210,15 @@ public static ConsoleProxyAuthenticationResult
authenticateConsoleAccess(Console
}
String sessionUuid = param.getSessionUuid();
- if (allowedSessions.contains(sessionUuid)) {
- LOGGER.debug("Acquiring the session " + sessionUuid + " not
available for future use");
- allowedSessions.remove(sessionUuid);
- } else {
- LOGGER.info("Session " + sessionUuid + " has already been used,
cannot connect");
- authResult.setSuccess(false);
- return authResult;
+ synchronized (allowedSessionsLock) {
+ if (allowedSessions.contains(sessionUuid)) {
+ LOGGER.debug("Acquiring the session " + sessionUuid + " not
available for future use");
+ allowedSessions.remove(sessionUuid);
+ } else {
+ LOGGER.info("Session " + sessionUuid + " has already been
used, cannot connect");
+ authResult.setSuccess(false);
+ return authResult;
+ }
Review Comment:
👍
--
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]