mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
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:
@@ -648,8 +648,9 @@ Guacamole.Client = function(tunnel) {
|
|||||||
if (stream.onack)
|
if (stream.onack)
|
||||||
stream.onack(new Guacamole.Status(code, reason));
|
stream.onack(new Guacamole.Status(code, reason));
|
||||||
|
|
||||||
// If code is an error, invalidate stream
|
// If code is an error, invalidate stream if not already
|
||||||
if (code >= 0x0100) {
|
// invalidated by onack handler
|
||||||
|
if (code >= 0x0100 && output_streams[stream_index] === stream) {
|
||||||
stream_indices.free(stream_index);
|
stream_indices.free(stream_index);
|
||||||
delete output_streams[stream_index];
|
delete output_streams[stream_index];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user