]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] One more polishing thing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Sep 2021 12:47:48 +0000 (13:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Sep 2021 12:47:48 +0000 (13:47 +0100)
src/libserver/redis_pool.cxx

index e2deb518177935bd52802c083560f48a00c3d9db..46bb81d241ba9fdffe335e5cc9629d8dde08d339 100644 (file)
@@ -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;
                }
        }