@@ -1216,10 +1216,10 @@ RedisClient.prototype.eval = RedisClient.prototype.EVAL = function () {
1216
1216
exports . createClient = function ( arg0 , arg1 , arg2 ) {
1217
1217
if ( arguments . length === 0 ) {
1218
1218
1219
- // createClient()
1219
+ // createClient()
1220
1220
return createClient_tcp ( default_port , default_host , { } ) ;
1221
1221
1222
- } else if ( typeof arg0 === 'number' ||
1222
+ } else if ( typeof arg0 === 'number' ||
1223
1223
typeof arg0 === 'string' && arg0 . match ( / ^ \d + $ / ) ) {
1224
1224
1225
1225
// createClient( 3000, host, options)
@@ -1238,10 +1238,10 @@ exports.createClient = function(arg0, arg1, arg2){
1238
1238
1239
1239
} else if ( arg0 === null && arg1 === null ) {
1240
1240
1241
- // for backward compatibility
1241
+ // for backward compatibility
1242
1242
// createClient(null,null,options)
1243
1243
return createClient_tcp ( default_port , default_host , arg2 ) ;
1244
-
1244
+
1245
1245
} else {
1246
1246
throw new Error ( 'unknown type of connection in createClient()' ) ;
1247
1247
}
@@ -1264,7 +1264,7 @@ var createClient_tcp = function (port_arg, host_arg, options) {
1264
1264
var cnxOptions = {
1265
1265
'port' : port_arg || default_port ,
1266
1266
'host' : host_arg || default_host ,
1267
- 'family' : ( options && options . family === 'IPv6' ) ? 'IPv6' : 'IPv4'
1267
+ 'family' : ( options && options . family === 'IPv6' ) ? 6 : 4
1268
1268
} ;
1269
1269
var net_client = net . createConnection ( cnxOptions ) ;
1270
1270
var redis_client = new RedisClient ( net_client , options || { } ) ;
0 commit comments