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: #16080
Ref: #14985
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
trivikr authored and targos committed Oct 18, 2017
1 parent 7218bba commit ae3836a
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 @@ -111,9 +111,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 ae3836a

Please sign in to comment.