test: deflake http2-cancel-while-client-reading

Add missing `'error'` event handler.

Fixes: https://github.com/nodejs/node/issues/40610

PR-URL: https://github.com/nodejs/node/pull/40659
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Luigi Pinca authored and Node.js GitHub Bot committed 2021-11-04 19:32:15 +00:00
1 parent 8fce09e2a5
commit 0a62026f32
1 file changed
+1
@@ -20,6 +20,7 @@ server.on('stream', common.mustCall(function(stream) {
client_stream.pause();
client_stream.close(http2.constants.NGHTTP2_CANCEL);
});
stream.on('error', () => {});
}));
server.listen(0, function() {