From: Vsevolod Stakhov Date: Thu, 16 Sep 2021 12:47:48 +0000 (+0100) Subject: [Minor] One more polishing thing X-Git-Tag: 3.1~158 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=21a1720ac3b4953a250ad092dc7ccfd681600a35;p=rspamd.git [Minor] One more polishing thing --- 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; } }