mod_limits: Don't emit error when no burst period is configured 0.11
authorMatthew Wild <mwild1@gmail.com>
Tue, 11 May 2021 14:10:26 +0100
branch0.11
changeset 11554 929de6ade6b6
parent 11553 5a484bd050a7
child 11555 aaf9c6b6d18d
mod_limits: Don't emit error when no burst period is configured
plugins/mod_limits.lua
--- a/plugins/mod_limits.lua	Mon Apr 26 15:32:05 2021 +0200
+++ b/plugins/mod_limits.lua	Tue May 11 14:10:26 2021 +0100
@@ -31,7 +31,7 @@
 		burst = burst:match("^(%d+) ?s$");
 	end
 	local n_burst = tonumber(burst);
-	if not n_burst then
+	if burst and not n_burst then
 		module:log("error", "Unable to parse burst for %s: %q, using default burst interval (%ds)", sess_type, tostring(burst), default_burst);
 	end
 	return n_burst or default_burst;