From 85ea0ba9166ec92bf957fdca231e25568caba34a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 27 Sep 2016 21:33:36 +0100 Subject: [PATCH] [Minor] Fix processing of messages with no recipients --- src/plugins/lua/ratelimit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 1df96c2c5..83cbd5436 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -185,7 +185,7 @@ local function dynamic_rate_key(task, rtype) else rate_keys = {} rcpts = task:get_recipients(0) - if not rcpts and rcpts[1] and rcpts[1]['addr'] then + if not rcpts or not rcpts[1] or not rcpts[1]['addr'] then return nil end local key_s = table.concat(key_t, ":") -- 2.39.5