From c457d007cd54c0c6162e5055364a3cad69f640b0 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Fri, 1 Feb 2019 12:23:07 -0800 Subject: [PATCH] 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 Reviewed-By: James M Snell --- test/parallel/test-tls-socket-default-options.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-socket-default-options.js b/test/parallel/test-tls-socket-default-options.js index f086377b0faa20..87f785dab5e1b3 100644 --- a/test/parallel/test-tls-socket-default-options.js +++ b/test/parallel/test-tls-socket-default-options.js @@ -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');