Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed May 28, 2022
1 parent a201b69 commit 8c25ae0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion db/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ function connectMongo(mongoose, config) {
setTimeout(() => {
process.exit(1);
}, 10000);
})
});
mongoose.connection.on('disconnected', () => {
console.warn("Mongo disconnected, restarting app");
setTimeout(() => {
process.exit(1);
}, 10000);
});

}

0 comments on commit 8c25ae0

Please sign in to comment.