node-http2 icon indicating copy to clipboard operation
node-http2 copied to clipboard

Remove invalid assert

Open thughes opened this issue 7 years ago • 1 comments

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

thughes avatar Mar 07 '17 19:03 thughes

merged https://github.com/kaazing/node-http2/commit/f367de6d7dd7085fd0a377958f4390371da50048

hthetiot avatar Aug 23 '17 18:08 hthetiot