--- 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();
--- 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