database: exit if initial connection fails (#500)
This commit is contained in:
parent
f2000b4459
commit
bb3b9004e0
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue