From a096abd735fc34c390e01e927f5b4d5009c7c94f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 22 Feb 2022 20:34:54 -0800 Subject: [PATCH] GUACAMOLE-896: Always flush instruction buffer upon end of static tunnel. --- .../src/main/webapp/modules/SessionRecording.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/SessionRecording.js b/guacamole-common-js/src/main/webapp/modules/SessionRecording.js index 9673a0760..8512c58dd 100644 --- a/guacamole-common-js/src/main/webapp/modules/SessionRecording.js +++ b/guacamole-common-js/src/main/webapp/modules/SessionRecording.js @@ -442,8 +442,8 @@ Guacamole.SessionRecording = function SessionRecording(source) { tunnel.onstatechange = function tunnelStateChanged(state) { if (state === Guacamole.Tunnel.State.CLOSED) { - // Append to Blob (creating a new Blob in the process) - if (instructionBuffer.length >= BLOCK_SIZE) { + // Append any remaining instructions + if (instructionBuffer.length) { recordingBlob = new Blob([recordingBlob, instructionBuffer]); instructionBuffer = ''; }