]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Report redis error when getting stats keys
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 25 Oct 2016 14:44:32 +0000 (16:44 +0200)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 25 Oct 2016 14:44:32 +0000 (16:44 +0200)
src/libstat/backends/redis_backend.c

index 72b3a349152ac01de59c984db6585a674e3bd4cf..2018f303aa60ce1538c6054ccfc4a0e41afd3cfd 100644 (file)
@@ -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);
        }