#include <guacamole/guacio.h>
#include <guacamole/client.h>
#include <guacamole/log.h>
#include <guacamole/guacio.h>
#include <guacamole/client.h>
#include <guacamole/log.h>
/* Occasionally ping client with repeat of last sync */
guac_timestamp timestamp = guac_current_timestamp();
if (timestamp - last_ping_timestamp > GUAC_SYNC_FREQUENCY) {
/* Occasionally ping client with repeat of last sync */
guac_timestamp timestamp = guac_current_timestamp();
if (timestamp - last_ping_timestamp > GUAC_SYNC_FREQUENCY) {
- if (
- guac_send_sync(io, client->last_sent_timestamp)
- || guac_flush(io)
- ) {
+
+ /* Send sync */
+ if (guac_send_sync(io, client->last_sent_timestamp)) {
+ guac_log_error("Error sending \"sync\" instruction: %s", guac_status_string(guac_error));
/* Send sync instruction */
client->last_sent_timestamp = guac_current_timestamp();
if (guac_send_sync(io, client->last_sent_timestamp)) {
/* Send sync instruction */
client->last_sent_timestamp = guac_current_timestamp();
if (guac_send_sync(io, client->last_sent_timestamp)) {
guac_client_stop(client);
return NULL;
}
/* Call handler, stop on error */
if (guac_client_handle_instruction(client, instruction) < 0) {
guac_client_stop(client);
return NULL;
}
/* Call handler, stop on error */
if (guac_client_handle_instruction(client, instruction) < 0) {