Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove invalid assert
Fixes #228

In the case where this._push(frame) returns null (i.e., the frame is too
large for the window and split or the window size is <=0), moreNeeded
will be set to null. Then this._queue.push(frame) is called, but
moreNeeded is still null. Thus, any time the window is <=0 or the frame
is split we'll hit the assert:

  var moreNeeded = null;
  if (this._queue.length === 0) {
    moreNeeded = this._push(frame);
  }

  if (moreNeeded === null) {
    this._queue.push(frame);
  }

  return moreNeeded;

Credit goes to @jrabek for original version of this patch
  • Loading branch information
thughes authored and florianreinhart committed Mar 15, 2017
commit 074a654024a508b7f7110673c79a7fa72a894d2c
3 changes: 1 addition & 2 deletions lib/protocol/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ priority_loop:
var moreNeeded = this.push(frame);
this._changeStreamCount(frame.count_change);

assert(moreNeeded !== null); // The frame shouldn't be unforwarded
if (moreNeeded === false) {
if (!moreNeeded) {
break priority_loop;
}
}
Expand Down