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.
This commit is contained in:
Jeremy White 2013-08-27 17:46:47 -05:00
parent b0509ca449
commit c2bb090b16

View File

@ -318,19 +318,17 @@ 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
{
this.log_err(this.type + ": No message handlers for this channel; message " + msg.type);
return false;
}
if (! rc)
this.log_warn(this.type + ": Unknown message type " + msg.type + "!");
{
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 (this.msgs_until_ack !== undefined && this.ack_window)
{