GUACAMOLE-25: Automatically invalidate output stream due to "ack" ONLY if it's the same stream that received the "ack". It is possible for the output stream to be freed and replaced with a different stream within onack.

This commit is contained in:
Michael Jumper
2016-05-01 23:51:18 -07:00
parent 4b88066f26
commit df3347f631

View File

@@ -648,8 +648,9 @@ Guacamole.Client = function(tunnel) {
if (stream.onack)
stream.onack(new Guacamole.Status(code, reason));
// If code is an error, invalidate stream
if (code >= 0x0100) {
// If code is an error, invalidate stream if not already
// invalidated by onack handler
if (code >= 0x0100 && output_streams[stream_index] === stream) {
stream_indices.free(stream_index);
delete output_streams[stream_index];
}