summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-19 16:12:57 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-20 12:20:38 +0100
commit5648d0506d42a114ba29b18a89e41f86ad56de36 (patch)
tree42f03b0a7fa8fee5610012ac6ebd259d3154a112
parent9ed43072920797625e95ef6783a95736330909a6 (diff)
downloadrspamd-5648d0506d42a114ba29b18a89e41f86ad56de36.tar.gz
rspamd-5648d0506d42a114ba29b18a89e41f86ad56de36.zip
[Fix] Fix Redis timeout set
Issue: #1646
-rw-r--r--rules/global_functions.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/rules/global_functions.lua b/rules/global_functions.lua
index e3c95c549..9c1decfaf 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