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

Add IPv6 and IPv4 tests

This commit is contained in:
migounette
2014-07-09 10:39:08 +02:00
parent 890f60ac57
commit 40f85aa42a
2 changed files with 52 additions and 1 deletions

View File

@@ -1183,10 +1183,16 @@ RedisClient.prototype.eval = RedisClient.prototype.EVAL = function () {
exports.createClient = function (port_arg, host_arg, options) {
var cnxFamily;
if (options && options.family) {
cnxFamily = (options.family == 'IPv6' ? 6 : 4);
}
var cnxOptions = {
'port' : port_arg || default_port,
'host' : host_arg || default_host,
'family' : options.family || 'IPv4'
'family' : cnxFamily || '4'
};
var redis_client, net_client;