commit 21a1720: [Minor] One more polishing thing

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Sep 16 12:49:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-09-16 13:47:48 +0100
URL: https://github.com/rspamd/rspamd/commit/21a1720ac3b4953a250ad092dc7ccfd681600a35 (HEAD -> master)

[Minor] One more polishing thing

---
 src/libserver/redis_pool.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libserver/redis_pool.cxx b/src/libserver/redis_pool.cxx
index e2deb5181..46bb81d24 100644
--- a/src/libserver/redis_pool.cxx
+++ b/src/libserver/redis_pool.cxx
@@ -282,10 +282,8 @@ redis_pool_connection::~redis_pool_connection()
 			pool->unregister_context(ctx);
 
 			if (!(ctx->c.flags & REDIS_FREEING)) {
-				redisAsyncContext *ac = ctx;
-
+				auto *ac = ctx;
 				/* To prevent on_disconnect here */
-				state = RSPAMD_REDIS_POOL_CONN_FINALISING;
 				ctx = nullptr;
 				ac->onDisconnect = nullptr;
 				redisAsyncFree(ac);
@@ -558,6 +556,8 @@ auto redis_pool::release_connection(redisAsyncContext *ctx,
 			conn->elt->release_connection(conn);
 		}
 		else {
+			msg_err("fatal internal error, connection with ctx %p is not found in the Redis pool",
+					ctx);
 			RSPAMD_UNREACHABLE;
 		}
 	}


More information about the Commits mailing list