Skip to content

Commit

Permalink
Remove read handler upon RDB connection close (#803)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
naglera authored Jul 18, 2024
1 parent 36e81d9 commit 8b48031
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b48031

Please sign in to comment.