Skip to content

Commit a47a4f4

Browse files
alexandru-baguAlexandru Bagu
andauthored
CPVM: fix cpu usage for console vm when using vnc over websockets (#6970)
Co-authored-by: Alexandru Bagu <alexandru.bagu@hotmail.com>
1 parent 72e3491 commit a47a4f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ public void run() {
114114
updateFrontEndActivityTime();
115115
}
116116
connectionAlive = client.isVncOverWebSocketConnectionAlive();
117+
try {
118+
Thread.sleep(1);
119+
} catch (Exception e) {
120+
s_logger.warn("Error on sleep for vnc over websocket", e);
121+
}
117122
} else if (client.isVncOverNioSocket()) {
118123
byte[] bytesArr;
119124
int nextBytes = client.getNextBytes();

0 commit comments

Comments
 (0)