back to using redis.auth

v1.18.x
Julian Lam 10 years ago
parent ebfc6d9785
commit 3554887f10

@ -93,10 +93,14 @@
if (redis_socket_or_host && redis_socket_or_host.indexOf('/') >= 0) { if (redis_socket_or_host && redis_socket_or_host.indexOf('/') >= 0) {
/* If redis.host contains a path name character, use the unix dom sock connection. ie, /tmp/redis.sock */ /* If redis.host contains a path name character, use the unix dom sock connection. ie, /tmp/redis.sock */
cxn = redis.createClient(nconf.get('redis:host'), { auth_pass: nconf.get('redis:password') }); cxn = redis.createClient(nconf.get('redis:host'));
} else { } else {
/* Else, connect over tcp/ip */ /* Else, connect over tcp/ip */
cxn = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host'), { auth_pass: nconf.get('redis:password') }); cxn = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host'));
}
if (nconf.get('redis:password')) {
cxn.auth(nconf.get('redis:password'));
} }
cxn.on('error', function (err) { cxn.on('error', function (err) {

Loading…
Cancel
Save