From d5e749bc8a1a6b003ba858310145745dcad5ec9c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 14 Jun 2022 16:28:49 +0200 Subject: util.startup: Fix async waiting for last shutdown steps Observed problem: When shutting down prosody would immediately exit after waiting for s2s connections to close, skipping the last cleanup events and reporting the exit reason and code. This happens because prosody.main_thread is in a waiting state and queuing startup.shutdown is dispatched trough the main loop via nexttick, but since the main loop was no longer running at that point it proceeded to the end of the prosody script and exited there. --- prosody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prosody') diff --git a/prosody b/prosody index 914396c2..ac623cef 100755 --- a/prosody +++ b/prosody @@ -82,4 +82,4 @@ end loop(); -thread:run(startup.shutdown); +startup.exit(); -- cgit v1.2.3