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
1 changed files with 3 additions and 4 deletions

View File

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