summaryrefslogtreecommitdiff
path: root/test/parallel/test-http2-too-many-headers.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-03-19 09:17:23 -0700
committerJames M Snell <jasnell@gmail.com>2018-03-22 13:48:47 -0700
commitcef909797af1d716b802f04264e51cf7f26c1b51 (patch)
tree0aec47d99dc8faf488f8f0e673b6f2113216887b /test/parallel/test-http2-too-many-headers.js
parentab755484a8a5113cb6d74f8e8ae5a26c44ae4582 (diff)
downloadandroid-node-v8-cef909797af1d716b802f04264e51cf7f26c1b51.tar.gz
android-node-v8-cef909797af1d716b802f04264e51cf7f26c1b51.tar.bz2
android-node-v8-cef909797af1d716b802f04264e51cf7f26c1b51.zip
http2: do not emit our own close emit in Http2Stream
Streams were recently updated to emit their own close event. The Http2Stream was an exception because it included the close argument with the close event. Refactor that to use the built in close. PR-URL: https://github.com/nodejs/node/pull/19451 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-too-many-headers.js')
-rw-r--r--test/parallel/test-http2-too-many-headers.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-http2-too-many-headers.js b/test/parallel/test-http2-too-many-headers.js
index 9b57060be6..6c8315c80e 100644
--- a/test/parallel/test-http2-too-many-headers.js
+++ b/test/parallel/test-http2-too-many-headers.js
@@ -25,8 +25,8 @@ server.listen(0, common.mustCall(() => {
type: Error,
message: 'Stream closed with error code NGHTTP2_ENHANCE_YOUR_CALM'
}));
- req.on('close', common.mustCall((code) => {
- assert.strictEqual(code, NGHTTP2_ENHANCE_YOUR_CALM);
+ req.on('close', common.mustCall(() => {
+ assert.strictEqual(req.rstCode, NGHTTP2_ENHANCE_YOUR_CALM);
server.close();
client.close();
}));