mirror of https://github.com/icedream/ts3bot.git
Try a synchronized shutdown when an uncaught exception occurs.
parent
a0bded664a
commit
6ed562e279
5
app.js
5
app.js
|
@ -30,6 +30,11 @@ doShutdownAsync = function(cb) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
process.on("uncaughtException", function(err) {
|
||||||
|
log.fatal("Shutting down due to an uncaught exception!", err);
|
||||||
|
app.shutdownSync();
|
||||||
|
});
|
||||||
|
|
||||||
process.on("exit", function(e) {
|
process.on("exit", function(e) {
|
||||||
log.debug("Triggered exit", e);
|
log.debug("Triggered exit", e);
|
||||||
app.shutdownSync();
|
app.shutdownSync();
|
||||||
|
|
Loading…
Reference in New Issue