diff options
author | Jeremy White <jwhite@codeweavers.com> | 2013-08-27 17:46:47 -0500 |
---|---|---|
committer | Jeremy White <jwhite@codeweavers.com> | 2013-08-27 17:46:47 -0500 |
commit | c2bb090b160c12680537b5b67e9d60ff944e3877 (patch) | |
tree | f8a0b0157c2d4dfa7eb8d835d2179b130f36ddba | |
parent | b0509ca4495928b267defcca016de18021a36436 (diff) |
Ack every message.
The failure to ack pings led to a nasty bug whereby an inactive client hangs.
The relatively recent change to monitor latency with ping exposed this bug.
-rw-r--r-- | spiceconn.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/spiceconn.js b/spiceconn.js index 494810e..318e9ae 100644 --- a/spiceconn.js +++ b/spiceconn.js @@ -318,20 +318,18 @@ SpiceConn.prototype = var rc; DEBUG > 0 && console.log("<< hdr " + this.channel_type() + " type " + msg.type + " size " + (msg.data && msg.data.byteLength)); rc = this.process_common_messages(msg); - if (rc) - return rc; - - if (this.process_channel_message) - rc = this.process_channel_message(msg); - else + if (! rc) { - this.log_err(this.type + ": No message handlers for this channel; message " + msg.type); - return false; + if (this.process_channel_message) + { + rc = this.process_channel_message(msg); + if (! rc) + this.log_warn(this.type + ": Unknown message type " + msg.type + "!"); + } + else + this.log_err(this.type + ": No message handlers for this channel; message " + msg.type); } - if (! rc) - this.log_warn(this.type + ": Unknown message type " + msg.type + "!"); - if (this.msgs_until_ack !== undefined && this.ack_window) { this.msgs_until_ack--; |