You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/05/24 04:27:55 UTC
[2/7] incubator-guacamole-client git commit: 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 wit
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.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/df3347f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/df3347f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/df3347f6
Branch: refs/heads/master
Commit: df3347f63110c14ce7394352cc144911f862a694
Parents: 4b88066
Author: Michael Jumper <mj...@apache.org>
Authored: Sun May 1 23:51:18 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon May 23 21:08:54 2016 -0700
----------------------------------------------------------------------
guacamole-common-js/src/main/webapp/modules/Client.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/df3347f6/guacamole-common-js/src/main/webapp/modules/Client.js
----------------------------------------------------------------------
diff --git a/guacamole-common-js/src/main/webapp/modules/Client.js b/guacamole-common-js/src/main/webapp/modules/Client.js
index 8903f21..060f460 100644
--- a/guacamole-common-js/src/main/webapp/modules/Client.js
+++ b/guacamole-common-js/src/main/webapp/modules/Client.js
@@ -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];
}