From 9c593bde89891522324fe84034e4a9bd415aae2c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 26 Sep 2018 22:30:08 -0700 Subject: [PATCH] GUACAMOLE-623: Kill connection if libwebsockets is destroying the underlying WebSocket. Older versions of libwebsockets will not necessarily invoke close events under all circumstances, and will instead sometimes summarily destroy the WebSocket. Thankfully there is another event for that, and newer versions of libwebsockets continue to define that event. We can hook into both to handle disconnect. --- src/protocols/kubernetes/kubernetes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protocols/kubernetes/kubernetes.c b/src/protocols/kubernetes/kubernetes.c index 66fc27d4..e115fc57 100644 --- a/src/protocols/kubernetes/kubernetes.c +++ b/src/protocols/kubernetes/kubernetes.c @@ -120,6 +120,7 @@ static int guac_kubernetes_lws_callback(struct lws* wsi, #endif /* Connection closed */ + case LWS_CALLBACK_WSI_DESTROY: case LWS_CALLBACK_CLOSED: guac_client_stop(client); guac_client_log(client, GUAC_LOG_DEBUG, "WebSocket connection to "