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.
This commit is contained in:
Michael Jumper 2018-09-26 22:30:08 -07:00
parent 44d3433ea9
commit 9c593bde89

View File

@ -120,6 +120,7 @@ static int guac_kubernetes_lws_callback(struct lws* wsi,
#endif #endif
/* Connection closed */ /* Connection closed */
case LWS_CALLBACK_WSI_DESTROY:
case LWS_CALLBACK_CLOSED: case LWS_CALLBACK_CLOSED:
guac_client_stop(client); guac_client_stop(client);
guac_client_log(client, GUAC_LOG_DEBUG, "WebSocket connection to " guac_client_log(client, GUAC_LOG_DEBUG, "WebSocket connection to "