]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix redis options parsing when no redis servers are defined
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 1 Mar 2017 09:35:50 +0000 (09:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 1 Mar 2017 09:35:50 +0000 (09:35 +0000)
rules/global_functions.lua

index d0e9c07fba7a3a0b2a6a24ca15e6e66c0f82b6e6..e3a167a076e6b650d957d3205954239919e5cfa7 100644 (file)
@@ -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