GUACAMOLE-623: Merge start terminal once Kubernetes connection is ready.

This commit is contained in:
Nick Couchman 2018-09-27 21:23:58 -04:00
commit 7352d66819

View File

@ -64,6 +64,8 @@ static int guac_kubernetes_lws_callback(struct lws* wsi,
void* in, size_t length) { void* in, size_t length) {
guac_client* client = guac_kubernetes_lws_current_client; guac_client* client = guac_kubernetes_lws_current_client;
guac_kubernetes_client* kubernetes_client =
(guac_kubernetes_client*) client->data;
/* Do not handle any further events if connection is closing */ /* Do not handle any further events if connection is closing */
if (client->state != GUAC_CLIENT_RUNNING) { if (client->state != GUAC_CLIENT_RUNNING) {
@ -94,6 +96,9 @@ static int guac_kubernetes_lws_callback(struct lws* wsi,
guac_client_log(client, GUAC_LOG_INFO, guac_client_log(client, GUAC_LOG_INFO,
"Kubernetes connection successful."); "Kubernetes connection successful.");
/* Allow terminal to render */
guac_terminal_start(kubernetes_client->term);
/* Schedule check for pending messages in case messages were added /* Schedule check for pending messages in case messages were added
* to the outbound message buffer prior to the connection being * to the outbound message buffer prior to the connection being
* fully established */ * fully established */