Skip to content
Closed
Prev Previous commit
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.
  • Loading branch information
sam-github committed Feb 5, 2019
commit 619b034ecf4e134a9d859e7598fe0d465c067c52
5 changes: 3 additions & 2 deletions test/parallel/test-tls-socket-default-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down