From 8b480310a629300c7cb28576f04df889bda21198 Mon Sep 17 00:00:00 2001 From: naglera <58042354+naglera@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:14:02 +0300 Subject: [PATCH] Remove read handler upon RDB connection close (#803) Primary side: Remove read handler upon RDB connection close. At this stage we do not expect any writed form that connection so it should be safe to remove the read handler. Otherwise the read handler will keep printing the `Client closed connection` logs, see handleReadResult. Signed-off-by: naglera --- src/networking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/networking.c b/src/networking.c index e27194b96e..7442a69e5b 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1890,6 +1890,7 @@ int freeClientsInAsyncFreeQueue(void) { * it serves as a reference to the first required replication data block for * this replica */ if (!c->rdb_client_disconnect_time) { + if (c->conn) connSetReadHandler(c->conn, NULL); c->rdb_client_disconnect_time = server.unixtime; serverLog(LL_VERBOSE, "Postpone RDB client id=%llu (%s) free for %d seconds", (unsigned long long)c->id, replicationGetReplicaName(c), server.wait_before_rdb_client_free);