diff options
author | Kim Alvefur <zash@zash.se> | 2022-06-14 19:21:20 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-06-14 19:21:20 +0200 |
commit | 529d711bf1ab3844aa1f4485206b97b669a4a985 (patch) | |
tree | 6798c9c41c1de28988c72af33b3927e1e4efd03f /util | |
parent | 07660a908817500a6f17dd2fad8cc38f373d82f1 (diff) | |
parent | d5e749bc8a1a6b003ba858310145745dcad5ec9c (diff) | |
download | prosody-529d711bf1ab3844aa1f4485206b97b669a4a985.tar.gz prosody-529d711bf1ab3844aa1f4485206b97b669a4a985.zip |
Merge 0.12->trunk
Diffstat (limited to 'util')
-rw-r--r-- | util/startup.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/startup.lua b/util/startup.lua index ab8b61da..e2e7db09 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -353,7 +353,7 @@ function startup.add_global_prosody_functions() reason = reason; code = code; }); - server.setquitting(true); + prosody.main_thread:run(startup.shutdown); end end @@ -644,6 +644,10 @@ function startup.shutdown() prosody.log("debug", "Shutdown reason was: %s", prosody.shutdown_reason or "not specified"); prosody.log("debug", "Exiting with status code: %d", prosody.shutdown_code or 0); + server.setquitting(true); +end + +function startup.exit() os.exit(prosody.shutdown_code); end |