mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-30 17:09:38 +00:00
Give other events chance to fire.
After each complete framebufferUpdate, set a short timer to continue processing the receive queue. This gives other events a chance to fire. Especially important when noVNC is integrated into another website.
This commit is contained in:
@@ -1250,13 +1250,12 @@ handle_message: function () {
|
||||
RFB.disconnect();
|
||||
break;
|
||||
case 'normal':
|
||||
while ((RFB.state === 'normal') && (RFB.RQ.length > 0)) {
|
||||
if ((RFB.state === 'normal') && (RFB.RQ.length > 0)) {
|
||||
if (RFB.normal_msg()) {
|
||||
// true means we can continue processing
|
||||
Util.Debug("More data to process");
|
||||
} else {
|
||||
// false means we need more data
|
||||
break;
|
||||
// Give other events a chance to run
|
||||
setTimeout(RFB.handle_message, 10);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user