// 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;
+ }
}
}
// 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;
+ }
}
}