From 3554887f10a50c2a0920095974b2bf42cdbaf64f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Sep 2014 17:13:09 -0400 Subject: [PATCH] back to using redis.auth --- src/database/redis.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/database/redis.js b/src/database/redis.js index 8b0a4fceac..8487e363d3 100644 --- a/src/database/redis.js +++ b/src/database/redis.js @@ -93,10 +93,14 @@ 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 */ - cxn = redis.createClient(nconf.get('redis:host'), { auth_pass: nconf.get('redis:password') }); + cxn = redis.createClient(nconf.get('redis:host')); } else { /* 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) {