summaryrefslogtreecommitdiffstats
path: root/testing/xpcshell/node-http2/lib
diff options
context:
space:
mode:
Diffstat (limited to 'testing/xpcshell/node-http2/lib')
-rw-r--r--testing/xpcshell/node-http2/lib/protocol/flow.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/xpcshell/node-http2/lib/protocol/flow.js b/testing/xpcshell/node-http2/lib/protocol/flow.js
index 6bec857551..2768983374 100644
--- a/testing/xpcshell/node-http2/lib/protocol/flow.js
+++ b/testing/xpcshell/node-http2/lib/protocol/flow.js
@@ -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);
+ }
}
};