mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Fixed potential layer sync issue (if multiple layers are used, and multiple layers are ready, multiply unnecessary sync responses may be sent for a single sync instruction)
This commit is contained in:
@@ -333,17 +333,22 @@ function GuacamoleClient(display, tunnel) {
|
||||
|
||||
}
|
||||
|
||||
// Count active layers and install sync tracking hook
|
||||
// Count active, not-ready layers and install sync tracking hooks
|
||||
for (var i=0; i<layers.length; i++) {
|
||||
|
||||
var layer = layers[i];
|
||||
if (layer) {
|
||||
if (layer && !layer.isReady()) {
|
||||
layersToSync++;
|
||||
layer.sync(syncLayer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If all layers are ready, then we didn't install any hooks.
|
||||
// Send sync message now,
|
||||
if (layersToSync == 0)
|
||||
tunnel.sendMessage("sync:" + timestamp + ";");
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user