Skip to content

Flow control may block non-flow-controlled frames #23

@nwgh

Description

@nwgh

For all frame types, lib/stream.js uses this._pushUpstream to submit the frame for sending, which in turn calls Flow.prototype.push. In Flow.prototype.push, we could conceivably get into a state where there are DATA frames queued (so this._queue.length !== 0), so moreNeeded will not get set to non-null, and the check on line 278 will evaluate to true, thus enqueuing the frame, regardless of what type of frame it is. We should check the frame type in Flow.prototype.push before checking moreNeeded at all, so we don't end up blocking non-flow-controlled frames (I think).

I can whip up a patch for this, but I wanted to submit the issue to make sure I'm not crazy before doing the work :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions