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: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
d597b9193f
commit
a046ae5ced
@ -54,8 +54,9 @@ function test(client, callback) {
|
||||
}));
|
||||
}));
|
||||
|
||||
// Client doesn't support the 'secureConnect' event, and doesn't error if
|
||||
// authentication failed. Caller must explicitly check for failure.
|
||||
// `new TLSSocket` doesn't support the 'secureConnect' event on client side,
|
||||
// and doesn't error if authentication failed. Caller must explicitly check
|
||||
// for failure.
|
||||
(new tls.TLSSocket(null, client)).connect(pair.server.server.address().port)
|
||||
.on('connect', common.mustCall(function() {
|
||||
this.end('hello');
|
||||
|
Loading…
x
Reference in New Issue
Block a user