From: Vsevolod Stakhov Date: Sat, 19 Nov 2016 10:22:17 +0000 (+0000) Subject: [Minor] Add refcounts to the debug log X-Git-Tag: 1.4.0~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=33d599872d1edfc27fed12e11087e878d8165df1;p=rspamd.git [Minor] Add refcounts to the debug log --- diff --git a/src/libserver/redis_pool.c b/src/libserver/redis_pool.c index 0a692478a..74ca8811f 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);