This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new 4e34e6b3348 console proxy client sleep more generic (#8694)
4e34e6b3348 is described below
commit 4e34e6b334883fb468fd994af2bd17aa176c90cd
Author: dahn <[email protected]>
AuthorDate: Tue Feb 27 07:24:05 2024 +0100
console proxy client sleep more generic (#8694)
* Make wait in the noVNC console proxy client more generic
* Update
services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
Co-authored-by: Wei Zhou <[email protected]>
---------
Co-authored-by: Wei Zhou <[email protected]>
---
.../java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
b/services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
index 27fabb53124..cfa62114c3d 100644
---
a/services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
+++
b/services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyNoVncClient.java
@@ -114,11 +114,6 @@ public class ConsoleProxyNoVncClient implements
ConsoleProxyClient {
updateFrontEndActivityTime();
}
connectionAlive = session.isOpen();
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- s_logger.error("Error on sleep for vnc over
websocket", e);
- }
} else if (client.isVncOverNioSocket()) {
byte[] bytesArr;
int nextBytes = client.getNextBytes();
@@ -139,6 +134,11 @@ public class ConsoleProxyNoVncClient implements
ConsoleProxyClient {
connectionAlive = false;
}
}
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {
+ s_logger.error("Error on sleep for vnc sessions",
e);
+ }
}
s_logger.info(String.format("Connection with client [%s]
is dead.", clientId));
} catch (IOException e) {