summaryrefslogtreecommitdiffstats
path: root/lualib/global_functions.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualib/global_functions.lua')
-rw-r--r--lualib/global_functions.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/lualib/global_functions.lua b/lualib/global_functions.lua
index 17c8f11ea..4447f85ef 100644
--- a/lualib/global_functions.lua
+++ b/lualib/global_functions.lua
@@ -38,11 +38,13 @@ local 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