Browse Source

test: http2 connectionListener reject client

This code change modifies connectionListener tests to cover test case
where this.emit('unknownProtocol', socket) returns false

PR-URL: https://github.com/nodejs/node/pull/16080
Ref: https://github.com/nodejs/node/issues/14985
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v9.x-staging
Trivikram Kamat 7 years ago
committed by James M Snell
parent
commit
3cc725d9c6
  1. 4
      test/parallel/test-http2-https-fallback.js

4
test/parallel/test-http2-https-fallback.js

@ -110,9 +110,9 @@ function onSession(session) {
common.mustCall(onRequest) common.mustCall(onRequest)
); );
server.on('unknownProtocol', common.mustCall((socket) => { server.once('unknownProtocol', common.mustCall((socket) => {
socket.destroy(); socket.destroy();
}, 2)); }));
server.listen(0); server.listen(0);

Loading…
Cancel
Save