From cef909797af1d716b802f04264e51cf7f26c1b51 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 19 Mar 2018 09:17:23 -0700 Subject: 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 --- test/parallel/test-http2-too-many-headers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/parallel/test-http2-too-many-headers.js') 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(); })); -- cgit v1.2.3