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.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/9c593bde
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/9c593bde
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/9c593bde

Branch: refs/heads/master
Commit: 9c593bde89891522324fe84034e4a9bd415aae2c
Parents: 44d3433
Author: Michael Jumper <mjum...@apache.org>
Authored: Wed Sep 26 22:30:08 2018 -0700
Committer: Michael Jumper <mjum...@apache.org>
Committed: Wed Sep 26 22:31:25 2018 -0700

----------------------------------------------------------------------
 src/protocols/kubernetes/kubernetes.c | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/9c593bde/src/protocols/kubernetes/kubernetes.c
----------------------------------------------------------------------
diff --git a/src/protocols/kubernetes/kubernetes.c 
b/src/protocols/kubernetes/kubernetes.c
index 66fc27d..e115fc5 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 "

Reply via email to