Diff

plugins/mod_limits.lua @ 11550:929de6ade6b6 0.11

mod_limits: Don't emit error when no burst period is configured
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 May 2021 14:10:26 +0100
parent 8803:60e113f3682f
child 11554:db8e41eb6eff
line wrap: on
line diff
--- 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;