Skip to content

Commit 4e34e6b

Browse files
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]>
1 parent bbe56ae commit 4e34e6b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ public void run() {
114114
updateFrontEndActivityTime();
115115
}
116116
connectionAlive = session.isOpen();
117-
try {
118-
Thread.sleep(1);
119-
} catch (InterruptedException e) {
120-
s_logger.error("Error on sleep for vnc over websocket", e);
121-
}
122117
} else if (client.isVncOverNioSocket()) {
123118
byte[] bytesArr;
124119
int nextBytes = client.getNextBytes();
@@ -139,6 +134,11 @@ public void run() {
139134
connectionAlive = false;
140135
}
141136
}
137+
try {
138+
Thread.sleep(1);
139+
} catch (InterruptedException e) {
140+
s_logger.error("Error on sleep for vnc sessions", e);
141+
}
142142
}
143143
s_logger.info(String.format("Connection with client [%s] is dead.", clientId));
144144
} catch (IOException e) {

0 commit comments

Comments
 (0)