From 12dfd8feebd72cc0f0dcdcebbe70881cbd1acbe1 Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Sat, 2 Sep 2017 08:18:00 -0400 Subject: [PATCH] Fix to test both req & res error listeners --- test/parallel/test-http2-compat-serverresponse-destroy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http2-compat-serverresponse-destroy.js b/test/parallel/test-http2-compat-serverresponse-destroy.js index 5a8cc3b5103ef7..40c73b0887c32f 100644 --- a/test/parallel/test-http2-compat-serverresponse-destroy.js +++ b/test/parallel/test-http2-compat-serverresponse-destroy.js @@ -18,8 +18,8 @@ const errors = [ let nextError; const server = http2.createServer(common.mustCall((req, res) => { - req.once('error', common.mustNotCall()); - req.once('error', common.mustNotCall()); + req.on('error', common.mustNotCall()); + res.on('error', common.mustNotCall()); res.on('finish', common.mustCall(() => { assert.doesNotThrow(() => res.destroy(nextError));