You've already forked node-redis
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:
8
index.js
8
index.js
@@ -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;
|
||||
|
Reference in New Issue
Block a user