mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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:
1 parent
727b5b63ef
commit
3cc725d9c6
1 file changed
+2
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user