aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-22 09:21:23 +0100
committerKim Alvefur <zash@zash.se>2019-01-22 09:21:23 +0100
commit976c452a40c2711c5afc14097762515efa216023 (patch)
treeedac628d90878379d6fe710e7ac184a448c7350e
parentffd845f929ab51d182ae10765b5b9730d235f63b (diff)
downloadprosody-976c452a40c2711c5afc14097762515efa216023.tar.gz
prosody-976c452a40c2711c5afc14097762515efa216023.zip
core.statsmanager: Do a final collection on shutdown
-rw-r--r--core/statsmanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/statsmanager.lua b/core/statsmanager.lua
index 237b1dd5..50798ad0 100644
--- a/core/statsmanager.lua
+++ b/core/statsmanager.lua
@@ -97,6 +97,7 @@ if stats then
end
timer.add_task(stats_interval, collect);
prosody.events.add_handler("server-started", function () collect() end, -1);
+ prosody.events.add_handler("server-stopped", function () collect() end, -1);
else
log("debug", "Statistics enabled using %s provider, collection is disabled", stats_provider_name);
end