Changeset

11998:99be6874340b

mod_http_file_share: Fix measuring total storage use before it was known Passing nil to the metrics system causes errors later.
author Kim Alvefur <zash@zash.se>
date Fri, 03 Dec 2021 08:16:18 +0100
parents 11997:1ea01660c79a
children 11999:9d2eab56f124
files plugins/mod_http_file_share.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua	Fri Dec 03 01:02:02 2021 +0100
+++ b/plugins/mod_http_file_share.lua	Fri Dec 03 08:16:18 2021 +0100
@@ -78,7 +78,7 @@
 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);