Skip to content

Commit

Permalink
test: http2 connectionListener reject client
Browse files Browse the repository at this point in the history
This code change modifies connectionListener tests to cover test case
where this.emit('unknownProtocol', socket) returns false

PR-URL: nodejs#16080
Ref: nodejs#14985
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
trivikr authored and jasnell committed Oct 15, 2017
1 parent 727b5b6 commit 3cc725d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http2-https-fallback.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ function onSession(session) {
common.mustCall(onRequest)
);

server.on('unknownProtocol', common.mustCall((socket) => {
server.once('unknownProtocol', common.mustCall((socket) => {
socket.destroy();
}, 2));
}));

server.listen(0);

Expand Down

0 comments on commit 3cc725d

Please sign in to comment.