From fa5bd550a5a81fb7b5029f3b5079b33d3b96ec8a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 1 Mar 2017 09:35:50 +0000 Subject: [PATCH] [Fix] Fix redis options parsing when no redis servers are defined --- rules/global_functions.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rules/global_functions.lua b/rules/global_functions.lua index d0e9c07fb..e3a167a07 100644 --- a/rules/global_functions.lua +++ b/rules/global_functions.lua @@ -108,7 +108,11 @@ function rspamd_parse_redis_server(module_name) end end - return result + if result.read_servers then + return result + else + return nil + end end -- Performs async call to redis hiding all complexity inside function -- 2.39.5