Skip to content

Commit

Permalink
Receipt of REPLCONF VERSION reply should be triggered by event
Browse files Browse the repository at this point in the history
This add the missing return when repl_state change to RECEIVE_VERSION_REPLY,
this way we won’t be blocked if the primary doesn’t reply with REPLCONF
VERSION.

In practice i guess this is no likely to block in this context, reading
small responses are are likely to be received in one packet, so So this
is just a cleanup (consistent with the previous state machine processing).

Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Nov 19, 2024
1 parent 3d0c834 commit 9e51a8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -3589,6 +3589,7 @@ void syncWithPrimary(connection *conn) {
sdsfree(err);
err = NULL;
server.repl_state = REPL_STATE_RECEIVE_VERSION_REPLY;
return;
}

/* Receive VERSION reply. */
Expand Down

0 comments on commit 9e51a8f

Please sign in to comment.