aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_file_share.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-03 08:16:18 +0100
committerKim Alvefur <zash@zash.se>2021-12-03 08:16:18 +0100
commita3d8a25bdd7502231e24ed5ca1b19d3790a48bbc (patch)
tree02ac697e9ca858327598768be5c7e4beacfd0ba8 /plugins/mod_http_file_share.lua
parentca41268d26c0ccd45502e7c14bf31ca0f3b6410d (diff)
downloadprosody-a3d8a25bdd7502231e24ed5ca1b19d3790a48bbc.tar.gz
prosody-a3d8a25bdd7502231e24ed5ca1b19d3790a48bbc.zip
mod_http_file_share: Fix measuring total storage use before it was known
Passing nil to the metrics system causes errors later.
Diffstat (limited to 'plugins/mod_http_file_share.lua')
-rw-r--r--plugins/mod_http_file_share.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 4fc5a3b5..0f431343 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -78,7 +78,7 @@ end
module:hook_global("stats-update", function ()
measure_upload_cache_size(upload_cache:count());
measure_quota_cache_size(quota_cache:count());
- if total_storage_limit then
+ if total_storage_limit and total_storage_usage then
measure_total_storage_usage(total_storage_usage);
end
end);