From: Vsevolod Stakhov Date: Sat, 24 Dec 2022 21:37:02 +0000 (+0000) Subject: [Fix] Ratelimit: Use unpack for `HMGET` return value X-Git-Tag: 3.5~132 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d60483e9f9ea04a22df9264d92dad6872255d1d;p=rspamd.git [Fix] Ratelimit: Use unpack for `HMGET` return value --- diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 7e0afb8fa..9975f17a3 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -81,7 +81,7 @@ local bucket_check_script = [[ end last = tonumber(last) - local burst,pending = redis.call('HMGET', KEYS[1], 'b', 'p') + local burst,pending = unpack(redis.call('HMGET', KEYS[1], 'b', 'p')) burst,pending = tonumber(burst or '0'),tonumber(pending or '0') -- Sanity to avoid races if burst < 0 then burst = 0 end