From 9634a6679cc08ec0c004ffa5989b83519b1660e0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 19 Nov 2016 11:04:26 +0000 Subject: [Minor] Disable invalid unref for inactive connections --- src/libserver/redis_pool.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libserver') diff --git a/src/libserver/redis_pool.c b/src/libserver/redis_pool.c index fa9573f39..1efc4f743 100644 --- a/src/libserver/redis_pool.c +++ b/src/libserver/redis_pool.c @@ -116,6 +116,8 @@ rspamd_redis_pool_conn_dtor (struct rspamd_redis_pool_connection *conn) } if (conn->ctx) { + /* To prevent on_disconnect here */ + conn->active = TRUE; g_hash_table_remove (conn->elt->pool->elts_by_ctx, conn->ctx); redisAsyncFree (conn->ctx); } -- cgit v1.2.3