Skip to content

Commit 75b0bc9

Browse files
committed
Fix #645
1 parent 84cfcb4 commit 75b0bc9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,10 +1216,10 @@ RedisClient.prototype.eval = RedisClient.prototype.EVAL = function () {
12161216
exports.createClient = function(arg0, arg1, arg2){
12171217
if( arguments.length === 0 ){
12181218

1219-
// createClient()
1219+
// createClient()
12201220
return createClient_tcp(default_port, default_host, {});
12211221

1222-
} else if( typeof arg0 === 'number' ||
1222+
} else if( typeof arg0 === 'number' ||
12231223
typeof arg0 === 'string' && arg0.match(/^\d+$/) ){
12241224

12251225
// createClient( 3000, host, options)
@@ -1238,10 +1238,10 @@ exports.createClient = function(arg0, arg1, arg2){
12381238

12391239
} else if( arg0 === null && arg1 === null ){
12401240

1241-
// for backward compatibility
1241+
// for backward compatibility
12421242
// createClient(null,null,options)
12431243
return createClient_tcp(default_port, default_host, arg2);
1244-
1244+
12451245
} else {
12461246
throw new Error('unknown type of connection in createClient()');
12471247
}
@@ -1264,7 +1264,7 @@ var createClient_tcp = function (port_arg, host_arg, options) {
12641264
var cnxOptions = {
12651265
'port' : port_arg || default_port,
12661266
'host' : host_arg || default_host,
1267-
'family' : (options && options.family === 'IPv6') ? 'IPv6' : 'IPv4'
1267+
'family' : (options && options.family === 'IPv6') ? 6 : 4
12681268
};
12691269
var net_client = net.createConnection(cnxOptions);
12701270
var redis_client = new RedisClient(net_client, options || {});

0 commit comments

Comments
 (0)