rohityadavcloud commented on code in PR #7826:
URL: https://github.com/apache/cloudstack/pull/7826#discussion_r1294700463
##########
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java:
##########
@@ -113,32 +114,36 @@ public void run() {
if (client.isVncOverWebSocketConnectionOpen()) {
updateFrontEndActivityTime();
}
- connectionAlive =
client.isVncOverWebSocketConnectionAlive();
- try {
- Thread.sleep(1);
- } catch (Exception e) {
- s_logger.warn("Error on sleep for vnc over
websocket", e);
- }
+ connectionAlive = session.isOpen();
+ Thread.sleep(1);
} else if (client.isVncOverNioSocket()) {
byte[] bytesArr;
int nextBytes = client.getNextBytes();
bytesArr = new byte[nextBytes];
client.readBytes(bytesArr, nextBytes);
+ s_logger.trace(String.format("Read [%s] bytes from
client [%s]", nextBytes, clientId));
Review Comment:
should this be wrapped under isTraceEnabled (or similar)?
##########
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java:
##########
@@ -113,32 +114,36 @@ public void run() {
if (client.isVncOverWebSocketConnectionOpen()) {
updateFrontEndActivityTime();
}
- connectionAlive =
client.isVncOverWebSocketConnectionAlive();
- try {
- Thread.sleep(1);
- } catch (Exception e) {
- s_logger.warn("Error on sleep for vnc over
websocket", e);
- }
+ connectionAlive = session.isOpen();
+ Thread.sleep(1);
} else if (client.isVncOverNioSocket()) {
byte[] bytesArr;
int nextBytes = client.getNextBytes();
bytesArr = new byte[nextBytes];
client.readBytes(bytesArr, nextBytes);
+ s_logger.trace(String.format("Read [%s] bytes from
client [%s]", nextBytes, clientId));
if (nextBytes > 0) {
session.getRemote().sendBytes(ByteBuffer.wrap(bytesArr));
updateFrontEndActivityTime();
+ } else {
+ connectionAlive = session.isOpen();
}
} else {
b = new byte[100];
readBytes = client.read(b);
+ s_logger.trace(String.format("Read [%s] bytes from
client [%s]", readBytes, clientId));
Review Comment:
should this be wrapped under isTraceEnabled (or similar)?
--
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]