From a3d8a25bdd7502231e24ed5ca1b19d3790a48bbc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 3 Dec 2021 08:16:18 +0100 Subject: mod_http_file_share: Fix measuring total storage use before it was known Passing nil to the metrics system causes errors later. --- plugins/mod_http_file_share.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3