mirror of https://github.com/icedream/ts3bot.git
Added explicit process.exit after app shutdown.
Since introducing WebChimera.js the bot is no longer shutting down by itself after all services are shut down since the instances that WebChimera.js generates would still be alive after deletion. There is no way to get around this except if WebChimera.js reveals an explicit release function which it doesn't. The only release function gets called before the VM gets killed.develop
parent
c20462272f
commit
82c19a2196
6
app.js
6
app.js
|
@ -33,6 +33,7 @@ doShutdownAsync = function(cb) {
|
|||
process.on("uncaughtException", function(err) {
|
||||
log.error("Shutting down due to an uncaught exception!", err);
|
||||
app.shutdownSync();
|
||||
process.exit(0xFF);
|
||||
});
|
||||
|
||||
process.on("exit", function(e) {
|
||||
|
@ -43,24 +44,29 @@ process.on("exit", function(e) {
|
|||
process.on("SIGTERM", function(e) {
|
||||
log.debug("Caught SIGTERM signal");
|
||||
app.shutdown();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGINT", function() {
|
||||
log.debug("Caught SIGINT signal");
|
||||
app.shutdown();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGHUP", function() {
|
||||
log.debug("Caught SIGHUP signal");
|
||||
app.shutdown();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGQUIT", function() {
|
||||
log.debug("Caught SIGQUIT signal");
|
||||
app.shutdown();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGABRT", function() {
|
||||
log.debug("Caught SIGABRT signal");
|
||||
app.shutdown();
|
||||
process.exit(0);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue