calling auth immediately after client connection (apparently, not doing so throws errors on install?)

v1.18.x
Julian Lam 11 years ago
parent d9feaf6abc
commit 8ac7ccb4f8

@ -30,6 +30,10 @@
redisClient = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host'));
}
if (nconf.get('redis:password')) {
redisClient.auth(nconf.get('redis:password'));
}
redisClient.on('error', function (err) {
winston.error(err.message);
process.exit();
@ -51,10 +55,6 @@
postSearch = reds.createSearch('nodebbpostsearch'),
topicSearch = reds.createSearch('nodebbtopicsearch');
if (nconf.get('redis:password')) {
redisClient.auth(nconf.get('redis:password'));
}
var db = parseInt(nconf.get('redis:database'), 10);
if (db){

Loading…
Cancel
Save