]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add refcounts to the debug log
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 19 Nov 2016 10:22:17 +0000 (10:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 19 Nov 2016 10:22:17 +0000 (10:22 +0000)
src/libserver/redis_pool.c

index 0a692478ac96bd5a47bae792dafabb7d4b196ea8..74ca8811f57a8f4ae549c82ea61fe8ab01003714 100644 (file)
@@ -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);