From: Vsevolod Stakhov Date: Wed, 1 Mar 2017 09:35:50 +0000 (+0000) Subject: [Fix] Fix redis options parsing when no redis servers are defined X-Git-Tag: 1.5.0~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa5bd550a5a81fb7b5029f3b5079b33d3b96ec8a;p=rspamd.git [Fix] Fix redis options parsing when no redis servers are defined --- 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