aboutsummaryrefslogtreecommitdiff
path: root/lib/_tls_wrap.js
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2019-05-22 10:27:16 +0200
committerMichaƫl Zasso <targos@protonmail.com>2019-05-28 07:33:31 +0200
commit10e0d7f2acf1f82bde7d909d9d8979e2040f30e2 (patch)
treef17cbe161e8b5a19a9c306f6ee9c3bc36243055c /lib/_tls_wrap.js
parent6981565c202128030ae36bcaa6c75ac0a8c9e5d8 (diff)
downloadandroid-node-v8-10e0d7f2acf1f82bde7d909d9d8979e2040f30e2.tar.gz
android-node-v8-10e0d7f2acf1f82bde7d909d9d8979e2040f30e2.tar.bz2
android-node-v8-10e0d7f2acf1f82bde7d909d9d8979e2040f30e2.zip
tls: support the hints option
Make `tls.connect()` support the `hints` option for feature parity with `net.connect()`. PR-URL: https://github.com/nodejs/node/pull/27816 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r--lib/_tls_wrap.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 4f46204d06..9f7b46dd5f 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -1420,23 +1420,13 @@ exports.connect = function connect(...args) {
tlssock.once('secureConnect', cb);
if (!options.socket) {
- // If user provided the socket, its their responsibility to manage its
+ // If user provided the socket, it's their responsibility to manage its
// connectivity. If we created one internally, we connect it.
- const connectOpt = {
- path: options.path,
- port: options.port,
- host: options.host,
- family: options.family,
- localAddress: options.localAddress,
- localPort: options.localPort,
- lookup: options.lookup
- };
-
if (options.timeout) {
tlssock.setTimeout(options.timeout);
}
- tlssock.connect(connectOpt, tlssock._start);
+ tlssock.connect(options, tlssock._start);
}
tlssock._releaseControl();