Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit faadebb

Browse files
authored
Merge pull request #340 from cole-miller/address
replication: Check state in sendAppendEntriesResult
2 parents 02ae985 + 191a07e commit faadebb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/replication.c

+1
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ static void sendAppendEntriesResult(
803803
struct raft_io_send *req;
804804
int rv;
805805

806+
assert(r->state == RAFT_FOLLOWER);
806807
message.type = RAFT_IO_APPEND_ENTRIES_RESULT;
807808
message.server_id = r->follower_state.current_leader.id;
808809
message.server_address = r->follower_state.current_leader.address;

0 commit comments

Comments
 (0)