From 33d599872d1edfc27fed12e11087e878d8165df1 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 19 Nov 2016 10:22:17 +0000 Subject: [PATCH] [Minor] Add refcounts to the debug log --- src/libserver/redis_pool.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libserver/redis_pool.c b/src/libserver/redis_pool.c index 0a692478ac..74ca8811f5 100644 --- a/src/libserver/redis_pool.c +++ b/src/libserver/redis_pool.c @@ -154,7 +154,8 @@ rspamd_redis_conn_timeout (gint fd, short what, gpointer p) { struct rspamd_redis_pool_connection *conn = p; - msg_debug_rpool ("scheduled removal of connection"); + msg_debug_rpool ("scheduled removal of connection, refcount: %d", + conn->ref.refcount); REF_RELEASE (conn); } @@ -198,8 +199,8 @@ rspamd_redis_pool_on_disconnect (const struct redisAsyncContext *ac, int status, if (!conn->active) { /* Do nothing for active connections as it is already handled somewhere */ if (conn->ctx) { - msg_info_rpool ("inactive connection terminated: %s", - conn->ctx->errstr); + msg_info_rpool ("inactive connection terminated: %s, refs: %d", + conn->ctx->errstr, conn->ref.refcount); } REF_RELEASE (conn); -- 2.47.3