Skip to content

Commit ae3836a

Browse files
trivikrtargos
authored andcommitted
test: http2 connectionListener reject client
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 <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 7218bba commit ae3836a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ function onSession(session) {
111111
common.mustCall(onRequest)
112112
);
113113

114-
server.on('unknownProtocol', common.mustCall((socket) => {
114+
server.once('unknownProtocol', common.mustCall((socket) => {
115115
socket.destroy();
116-
}, 2));
116+
}));
117117

118118
server.listen(0);
119119

0 commit comments

Comments
 (0)