Mercurial > prosody-modules
comparison mod_firewall/definitions.lib.lua @ 2859:22e11645a895
mod_firewall: Trim trailing whitespace [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 03 Jan 2018 07:49:22 +0100 |
| parents | 8c879948a2cf |
| children | 9fd61234b6f0 |
comparison
equal
deleted
inserted
replaced
| 2858:150a7bd59043 | 2859:22e11645a895 |
|---|---|
| 38 local deny_when_full = not line:match("%(allow overflow%)"); | 38 local deny_when_full = not line:match("%(allow overflow%)"); |
| 39 return { | 39 return { |
| 40 single = function () | 40 single = function () |
| 41 return new_throttle(rate*burst, burst); | 41 return new_throttle(rate*burst, burst); |
| 42 end; | 42 end; |
| 43 | 43 |
| 44 multi = function () | 44 multi = function () |
| 45 local cache = require "util.cache".new(max_throttles, deny_when_full and evict_only_unthrottled or nil); | 45 local cache = require "util.cache".new(max_throttles, deny_when_full and evict_only_unthrottled or nil); |
| 46 return { | 46 return { |
| 47 poll_on = function (_, key, amount) | 47 poll_on = function (_, key, amount) |
| 48 assert(key, "no key"); | 48 assert(key, "no key"); |
