From 1c129b77cb1dc8af27dba00e84f1c7f424540a08 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 25 Oct 2016 16:44:32 +0200 Subject: [PATCH] [Minor] Report redis error when getting stats keys --- src/libstat/backends/redis_backend.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 72b3a3491..2018f303a 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -606,7 +606,12 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv) rspamd_upstream_ok (cbdata->selected); } else { - msg_err ("cannot get keys to gather stat"); + if (c->errstr) { + msg_err ("cannot get keys to gather stat: %s", c->errstr); + } + else { + msg_err ("cannot get keys to gather stat: unknown error"); + } rspamd_upstream_fail (cbdata->selected); rspamd_redis_async_cbdata_cleanup (cbdata); } -- 2.39.5