From 7dbb1b1ac03f429d08c81ab42f88d6b7569486cc Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 21 Mar 2014 18:06:59 -0700 Subject: [PATCH] GUAC-558: Do not send pending messages if tunnel is closed. --- guacamole-common-js/src/main/webapp/modules/Tunnel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js b/guacamole-common-js/src/main/webapp/modules/Tunnel.js index 6bea25c02..26450d813 100644 --- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js +++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js @@ -225,6 +225,10 @@ Guacamole.HTTPTunnel = function(tunnelURL) { function sendPendingMessages() { + // Do not attempt to send messages if not connected + if (tunnel.state !== Guacamole.Tunnel.State.OPEN) + return; + if (outputMessageBuffer.length > 0) { sendingMessages = true;