From 1e550b58d9357cc5c5a4f6442b4052ee235dddd5 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 2 Nov 2020 12:51:58 -0800 Subject: [PATCH] GUACAMOLE-221: Ensure guacd always enables broadcast socket keep-alive. --- src/guacd/proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guacd/proc.c b/src/guacd/proc.c index 9612dd33..9641ac05 100644 --- a/src/guacd/proc.c +++ b/src/guacd/proc.c @@ -330,6 +330,9 @@ static void guacd_exec_proc(guacd_proc* proc, const char* protocol) { /* The first file descriptor is the owner */ int owner = 1; + /* Enable keep alive on the broadcast socket */ + guac_socket_require_keep_alive(client->socket); + /* Add each received file descriptor as a new user */ int received_fd; while ((received_fd = guacd_recv_fd(proc->fd_socket)) != -1) { @@ -341,9 +344,6 @@ static void guacd_exec_proc(guacd_proc* proc, const char* protocol) { } - /* Enable keep alive on the broadcast socket */ - guac_socket_require_keep_alive(client->socket); - cleanup_client: /* Request client to stop/disconnect */