From 894229ded2a12b50cc9ebd552a398a93a3e39400 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 22 Mar 2014 15:13:41 -0700 Subject: [PATCH] GUAC-561: Send CLIENT_TIMEOUT if client is not responding. --- src/guacd/client.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/guacd/client.c b/src/guacd/client.c index fb285afb..2ab29be5 100644 --- a/src/guacd/client.c +++ b/src/guacd/client.c @@ -124,9 +124,15 @@ void* __guacd_client_input_thread(void* data) { /* Stop on error */ if (instruction == NULL) { - guacd_client_log_guac_error(client, - "Error reading instruction"); - guac_client_stop(client); + + if (guac_error == GUAC_STATUS_INPUT_TIMEOUT) + guac_client_abort(client, GUAC_PROTOCOL_STATUS_CLIENT_TIMEOUT, "Client is not responding."); + + else { + guacd_client_log_guac_error(client, "Error reading instruction"); + guac_client_stop(client); + } + return NULL; }