1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Add mention of tls option

This commit is contained in:
Paddy Byers
2015-10-19 17:19:16 +01:00
committed by Ruben Bridgewater
parent 1fa9f15ae4
commit c74107c972
3 changed files with 6 additions and 5 deletions

View File

@@ -36,13 +36,12 @@ function RedisClient (options) {
// Copy the options so they are not mutated
options = clone(options);
events.EventEmitter.call(this);
var self = this;
var cnx_options = {};
if (options.path) {
cnx_options.path = options.path;
this.address = options.path;
} else {
cnx_options.port = options.port || default_port;
cnx_options.port = +options.port || default_port;
cnx_options.host = options.host || default_host;
cnx_options.family = (!options.family && net.isIP(cnx_options.host)) || (options.family === 'IPv6' ? 6 : 4);
this.address = cnx_options.host + ':' + cnx_options.port;