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 <anagler123@gmail.com>
This commit is contained in:
naglera 2024-07-18 11:14:02 +03:00 committed by GitHub
parent 36e81d9e79
commit 8b480310a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);