From: Vsevolod Stakhov Date: Tue, 6 Sep 2016 16:03:48 +0000 (+0100) Subject: [Minor] Try to hunt issue with redis pool failures X-Git-Tag: 1.4.0~476 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=20974a72f19218a606c8c18b08f6327a6f5d9736;p=rspamd.git [Minor] Try to hunt issue with redis pool failures --- diff --git a/src/libserver/redis_pool.c b/src/libserver/redis_pool.c index f3f64d2f5..e84f2360e 100644 --- a/src/libserver/redis_pool.c +++ b/src/libserver/redis_pool.c @@ -332,7 +332,7 @@ rspamd_redis_pool_release_connection (struct rspamd_redis_pool *pool, conn = g_hash_table_lookup (pool->elts_by_ctx, ctx); if (conn != NULL) { - REF_RELEASE (conn); + g_assert (conn->active); if (is_fatal || ctx->err == REDIS_ERR_IO || ctx->err == REDIS_ERR_EOF) { /* We need to terminate connection forcefully */ @@ -347,6 +347,8 @@ rspamd_redis_pool_release_connection (struct rspamd_redis_pool *pool, rspamd_redis_pool_schedule_timeout (conn); msg_debug_rpool ("mark connection inactive"); } + + REF_RELEASE (conn); } else { g_assert_not_reached ();