Skip to content

Node.js based forum software built for the modern web

removed comments

barisusakli3275d26590a1
diff --git a/src/controllers/admin/database.js b/src/controllers/admin/database.js
index 3e89298813..8d6bf62fb8 100644
--- a/src/controllers/admin/database.js
+++ b/src/controllers/admin/database.js
@@ -12,18 +12,7 @@ databaseController.get = function(req, res, next) {
redis: function(next) {
if (nconf.get('redis')) {
var rdb = require('../../database/redis');
- // var cxn = rdb.connect();
- // Do not create new client if it exist.
- // This will cause memory leak & connection flood
- var cxn = rdb.client;
- // Redis was initalized.
- // Check cxn is unnecessary.
- // if (!cxn) {
- // cxn = rdb.client;
- // rdb.client = cxn;
- // }
-
- rdb.info(cxn, next);
+ rdb.info(rdb.client, next);
} else {
next();
}
diff --git a/src/database/mongo.js b/src/database/mongo.js
index c731e62d18..1746bbb19f 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -116,7 +116,6 @@
// Create a new redis connection and store it in module (skeleton)
rdb.client = rdb.connect();
- //
module.sessionStore = new sessionStore({
client: rdb.client,
ttl: 60 * 60 * 24 * 14