diff --git a/guacamole/client/web/javascript/guacamole.js b/guacamole/client/web/javascript/guacamole.js index 1a076471d..7ea64fb3c 100644 --- a/guacamole/client/web/javascript/guacamole.js +++ b/guacamole/client/web/javascript/guacamole.js @@ -544,6 +544,12 @@ function VNCClient(display) { function sendReady() { + // If not ready, do not send ready + if (background == null || !background.isReady()) { + setTimeout(sendReady, 50); + return; + } + // Start heartbeat signal var heartbeat = new XMLHttpRequest(); heartbeat.open("GET", "ready"); diff --git a/guacamole/client/web/javascript/layer.js b/guacamole/client/web/javascript/layer.js index 2074010e7..7a595b2ae 100644 --- a/guacamole/client/web/javascript/layer.js +++ b/guacamole/client/web/javascript/layer.js @@ -122,6 +122,10 @@ function Layer(width, height) { }; + display.isReady = function() { + return nextUpdateToDraw >= currentUpdate; + } + return display; }