From: Vsevolod Stakhov Date: Fri, 19 May 2017 15:12:57 +0000 (+0100) Subject: [Fix] Fix Redis timeout set X-Git-Tag: 1.5.8~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5648d0506d42a114ba29b18a89e41f86ad56de36;p=thirdparty%2Frspamd.git [Fix] Fix Redis timeout set Issue: #1646 --- diff --git a/rules/global_functions.lua b/rules/global_functions.lua index e3c95c549a..9c1decfaf9 100644 --- a/rules/global_functions.lua +++ b/rules/global_functions.lua @@ -36,11 +36,13 @@ function rspamd_parse_redis_server(module_name) -- Store options if not result['timeout'] then - result['timeout'] = default_timeout - end - if options['timeout'] and not result['timeout'] then - result['timeout'] = tonumber(options['timeout']) + if options['timeout'] then + result['timeout'] = tonumber(options['timeout']) + else + result['timeout'] = default_timeout + end end + if options['prefix'] and not result['prefix'] then result['prefix'] = options['prefix'] end