Skip to content

Commit

Permalink
Merge pull request #3974 from HeinleinSupport/fix/ratelimit
Browse files Browse the repository at this point in the history
[Fix] ratelimit - symbol per bucket
  • Loading branch information
vstakhov committed Nov 11, 2021
2 parents 1b1ef16 + a7ac20d commit 800518e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugins/lua/ratelimit.lua
Expand Up @@ -797,8 +797,8 @@ if opts then
end, fun.map(function(n,d)
return string.format('%s [%s]', n,
table.concat(fun.totable(fun.map(function(v)
return string.format('%s msgs burst, %s msgs/sec rate',
v.burst, v.rate)
return string.format('symbol: %s, %s msgs burst, %s msgs/sec rate',
v.symbol, v.burst, v.rate)
end, d.buckets)), '; ')
)
end, settings.limits))
Expand Down Expand Up @@ -877,9 +877,9 @@ if opts then

-- Register per bucket symbols
-- Display what's enabled
fun.each(function(set)
if set.buckets then
for _,b in ipairs(set.buckets) do
fun.each(function(set, lim)
if type(lim.buckets) == 'table' then
for _,b in ipairs(lim.buckets) do
if b.symbol then
rspamd_config:register_symbol{
type = 'virtual',
Expand Down

0 comments on commit 800518e

Please sign in to comment.