diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-06 17:03:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-06 17:40:13 +0100 |
commit | 20974a72f19218a606c8c18b08f6327a6f5d9736 (patch) | |
tree | 690990e86e03b63ce2b2ec85c6c7ae790c3b6a49 /src/libserver | |
parent | 8b81536577e231b763fa0f7537e9966de3706314 (diff) | |
download | rspamd-20974a72f19218a606c8c18b08f6327a6f5d9736.tar.gz rspamd-20974a72f19218a606c8c18b08f6327a6f5d9736.zip |
[Minor] Try to hunt issue with redis pool failures
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/redis_pool.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 (); |