diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-11-16 13:24:44 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-11-16 13:24:44 +0200 |
commit | 56cc6c85ad3812bbc2651ca2095d6b4b6c420ccb (patch) | |
tree | e0ab46e7869f0a7a320af27343e5db61196598ba /src/plugins/lua/ratelimit.lua | |
parent | 03e3d7063308dd169d5b1692ccd28403c16ddd76 (diff) | |
download | rspamd-56cc6c85ad3812bbc2651ca2095d6b4b6c420ccb.tar.gz rspamd-56cc6c85ad3812bbc2651ca2095d6b4b6c420ccb.zip |
[Minor] Fix upstreams handling
Diffstat (limited to 'src/plugins/lua/ratelimit.lua')
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 92d80fe32..f15d8633e 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -308,8 +308,7 @@ local function check_limits(task, args) fun.totable(fun.map(function(l) return l[2] end, args)) -- arguments ) if not ret then - rspamd_logger.errx(task, 'Redis MGET failed on %s', upstream:get_addr()) - upstream:fail() + rspamd_logger.err(task, 'got error connecting to redis') end end @@ -378,8 +377,7 @@ local function set_limits(task, args) conn:add_cmd('setex', v) end, fun.drop_n(1, values)) else - rspamd_logger.infox(task, 'got error while connecting to redis: %1', upstream:get_addr()) - upstream:fail() + rspamd_logger.err(task, 'got error while connecting to redis') end end end @@ -394,8 +392,7 @@ local function set_limits(task, args) fun.totable(fun.map(function(l) return l[2] end, args)) -- arguments ) if not ret then - rspamd_logger.errx(task, 'Redis MGET failed on %s', upstream:get_addr()) - upstream:fail() + rspamd_logger.err(task, 'got error connecting to redis') end end |