Skip to content

Commit

Permalink
Bug 1881204 - Avoid MaxListenersExceededWarning in node-http2/flow.js…
Browse files Browse the repository at this point in the history
… r=necko-reviewers,jesup

Differential Revision: https://phabricator.services.mozilla.com/D202294
  • Loading branch information
valenting committed Mar 8, 2024
1 parent 73b55ec commit 5bdca35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testing/xpcshell/node-http2/lib/protocol/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ Flow.prototype._read = function _read() {

// * otherwise, come back when the flow control window is positive
else {
this.once('window_update', this._read);
if (!this.listenerCount('window_update')) {
this.once('window_update', this._read);
}
}
};

Expand Down

0 comments on commit 5bdca35

Please sign in to comment.