diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-16 22:44:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-16 22:44:43 +0100 |
commit | f763095b66a53b0fcc73f21a99478deabebd2a5b (patch) | |
tree | bde7b68581a288e5d3fc8a036c80502296972394 /prosody | |
parent | e49c053133ec90f007ba2f8575773f3cf5c20b54 (diff) | |
parent | 92a6c7fbd21fd445f3bdeca240030264b1756961 (diff) | |
download | prosody-f763095b66a53b0fcc73f21a99478deabebd2a5b.tar.gz prosody-f763095b66a53b0fcc73f21a99478deabebd2a5b.zip |
Merge 0.10->trunk
Diffstat (limited to 'prosody')
-rwxr-xr-x | prosody | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -272,10 +272,14 @@ function init_global_state() end -- Function to initiate prosody shutdown - function prosody.shutdown(reason) + function prosody.shutdown(reason, code) log("info", "Shutting down: %s", reason or "unknown reason"); prosody.shutdown_reason = reason; - prosody.events.fire_event("server-stopping", {reason = reason}); + prosody.shutdown_code = code; + prosody.events.fire_event("server-stopping", { + reason = reason; + code = code; + }); server.setquitting(true); end end @@ -418,3 +422,4 @@ cleanup(); prosody.events.fire_event("server-stopped"); log("info", "Shutdown complete"); +os.exit(prosody.shutdown_code) |