Skip to content

Commit c457d00

Browse files
sam-githubaddaleax
authored andcommitted
test: clarify confusion over "client" in comment
Fix perplexing comment. It's not that TLS "clients" don't support 'secureConnect', it's that client sockets created with `new TLSSocket` (as opposed to `tls.connect()`) don't support that event. PR-URL: #25508 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1be8676 commit c457d00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parallel/test-tls-socket-default-options.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ function test(client, callback) {
5454
}));
5555
}));
5656

57-
// Client doesn't support the 'secureConnect' event, and doesn't error if
58-
// authentication failed. Caller must explicitly check for failure.
57+
// `new TLSSocket` doesn't support the 'secureConnect' event on client side,
58+
// and doesn't error if authentication failed. Caller must explicitly check
59+
// for failure.
5960
(new tls.TLSSocket(null, client)).connect(pair.server.server.address().port)
6061
.on('connect', common.mustCall(function() {
6162
this.end('hello');

0 commit comments

Comments
 (0)