CPVM: fix cpu usage for console vm when using vnc over websockets (#6970)

Co-authored-by: Alexandru Bagu <alexandru.bagu@hotmail.com>
This commit is contained in:
Alexandru Bagu 2023-08-14 16:45:04 +03:00 committed by GitHub
parent 72e3491cef
commit a47a4f4ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,11 @@ public class ConsoleProxyNoVncClient implements ConsoleProxyClient {
updateFrontEndActivityTime();
}
connectionAlive = client.isVncOverWebSocketConnectionAlive();
try {
Thread.sleep(1);
} catch (Exception e) {
s_logger.warn("Error on sleep for vnc over websocket", e);
}
} else if (client.isVncOverNioSocket()) {
byte[] bytesArr;
int nextBytes = client.getNextBytes();