aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-03-17 22:25:56 +0100
committerKim Alvefur <zash@zash.se>2016-03-17 22:25:56 +0100
commitfa204b9d3326e2e8f8cee29685c2f0ee53cfdb33 (patch)
treea1d72bfb2d57165a5fd310839f96355dd895f92b
parentaa6d79191613b687877e39b54732d875ea0ee767 (diff)
downloadprosody-fa204b9d3326e2e8f8cee29685c2f0ee53cfdb33.tar.gz
prosody-fa204b9d3326e2e8f8cee29685c2f0ee53cfdb33.zip
mod_register: Make sure only an on_evict function or nil is passed to util.cache
-rw-r--r--plugins/mod_register.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua
index e4b4bd51..fda717f7 100644
--- a/plugins/mod_register.lua
+++ b/plugins/mod_register.lua
@@ -187,7 +187,7 @@ local throttle_cache = new_cache(throttle_cache_size, blacklist_overflow and fun
module:log("info", "Adding ip %s to registration blacklist", ip);
blacklisted_ips[ip] = true;
end
-end);
+end or nil);
local function check_throttle(ip)
if not throttle_max then return true end