database: exit if initial connection fails (#500)

This commit is contained in:
calzoneman 2015-09-02 23:03:47 -07:00
parent f2000b4459
commit bb3b9004e0

View file

@ -24,10 +24,9 @@ module.exports.init = function () {
// Test the connection
pool.getConnection(function (err, conn) {
if(err) {
Logger.errlog.log("! DB connection failed");
Logger.errlog.log(err);
return;
if (err) {
Logger.errlog.log("Initial database connection failed: " + err.stack);
process.exit(1);
} else {
tables.init(module.exports.query, function (err) {
if (err) {