From 6fc6122e678fe88d5f9d607c3f332e1af9e2b8ac Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 8 Jan 2012 23:47:07 -0800 Subject: [PATCH] Only send sync response if timestamp is changing. --- guacamole-common-js/src/main/resources/guacamole.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/guacamole-common-js/src/main/resources/guacamole.js b/guacamole-common-js/src/main/resources/guacamole.js index 535f9b29a..0a1b72c52 100644 --- a/guacamole-common-js/src/main/resources/guacamole.js +++ b/guacamole-common-js/src/main/resources/guacamole.js @@ -404,8 +404,10 @@ Guacamole.Client = function(display, tunnel) { // Send sync response when layers are finished if (layersToSync == 0) { - tunnel.sendMessage("sync", timestamp); - currentTimestamp = timestamp; + if (timestamp != currentTimestamp) { + tunnel.sendMessage("sync", timestamp); + currentTimestamp = timestamp; + } } } @@ -424,8 +426,10 @@ Guacamole.Client = function(display, tunnel) { // If all layers are ready, then we didn't install any hooks. // Send sync message now, if (layersToSync == 0) { - tunnel.sendMessage("sync", timestamp); - currentTimestamp = timestamp; + if (timestamp != currentTimestamp) { + tunnel.sendMessage("sync", timestamp); + currentTimestamp = timestamp; + } } }