diff options
author | Matteo Collina <hello@matteocollina.com> | 2018-04-17 17:24:22 +0200 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2018-04-20 15:12:22 +0200 |
commit | 08577906569a4c2de70ad2a861e2f8456cd8fcdd (patch) | |
tree | d90569aa4d6099df48ffe16bb22db777c8640a92 /test/parallel/test-http2-compat-serverresponse-destroy.js | |
parent | 700344e388b57651c190222f570d658504b8c06f (diff) | |
download | node-new-08577906569a4c2de70ad2a861e2f8456cd8fcdd.tar.gz |
stream: prevent 'end' to be emitted after 'error'
This PR adds _readableState.errorEmitted and add the tracking of it.
Fixes: https://github.com/nodejs/node/issues/6083
PR-URL: https://github.com/nodejs/node/pull/20104
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-compat-serverresponse-destroy.js')
-rw-r--r-- | test/parallel/test-http2-compat-serverresponse-destroy.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/test/parallel/test-http2-compat-serverresponse-destroy.js b/test/parallel/test-http2-compat-serverresponse-destroy.js index 8ee52a74ab..4982208297 100644 --- a/test/parallel/test-http2-compat-serverresponse-destroy.js +++ b/test/parallel/test-http2-compat-serverresponse-destroy.js @@ -63,7 +63,6 @@ server.listen(0, common.mustCall(() => { req.on('close', common.mustCall(() => countdown.dec())); req.resume(); - req.on('end', common.mustCall()); } { @@ -78,6 +77,5 @@ server.listen(0, common.mustCall(() => { req.on('close', common.mustCall(() => countdown.dec())); req.resume(); - req.on('end', common.mustCall()); } })); |