# HG changeset patch # User Kim Alvefur # Date 1655227280 -7200 # Node ID dbbbcf6b805e7fcb0761efd2c62f719ac1468031 # Parent b4bc5a715e65248a71956a0333d68fc2bd677c2a# Parent cc0ec027781305ac2313d3636fb3885d8fcbba2f Merge 0.12->trunk diff -r b4bc5a715e65 -r dbbbcf6b805e prosody --- a/prosody Tue Jun 14 03:31:30 2022 +0200 +++ b/prosody Tue Jun 14 19:21:20 2022 +0200 @@ -82,4 +82,4 @@ loop(); -thread:run(startup.shutdown); +startup.exit(); diff -r b4bc5a715e65 -r dbbbcf6b805e util/startup.lua --- a/util/startup.lua Tue Jun 14 03:31:30 2022 +0200 +++ b/util/startup.lua Tue Jun 14 19:21:20 2022 +0200 @@ -353,7 +353,7 @@ reason = reason; code = code; }); - server.setquitting(true); + prosody.main_thread:run(startup.shutdown); end end @@ -644,6 +644,10 @@ 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