Skip to content

Node.js based forum software built for the modern web

added close db command

Baris Soner Usakli3958ee4120ce
diff --git a/src/database/mongo.js b/src/database/mongo.js
index 7c8c50a46b..d80cd35488 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -74,6 +74,10 @@
});
}
+ module.close = function() {
+ db.close();
+ }
+
//
// helper functions
//
diff --git a/src/database/redis.js b/src/database/redis.js
index 0c90128939..0c1d9b9673 100644
--- a/src/database/redis.js
+++ b/src/database/redis.js
@@ -72,6 +72,10 @@
callback(null);
}
+ module.close = function() {
+ redisClient.quit();
+ }
+
//
// Exported functions
//