Skip to content

Commit

Permalink
test: clarify confusion over "client" in comment
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sam-github committed Feb 6, 2019
1 parent d597b91 commit a046ae5
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit a046ae5

Please sign in to comment.