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>
This commit is contained in:
parent
727b5b63ef
commit
3cc725d9c6
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user