Skip to content

Commit 6d3b1dc

Browse files
committed
Fix the handling of empty heartbeats.
1 parent 9b0e4c8 commit 6d3b1dc

File tree

1 file changed

+1
-1
lines changed
  • contrib/raftable/raft/src

1 file changed

+1
-1
lines changed

contrib/raftable/raft/src/raft.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ static void raft_handle_update(raft_t r, raft_msg_update_t *m) {
812812
raft_entry_t *e = &r->log.newentry;
813813
raft_update_t *u = &e->update;
814814

815-
if (!m->snapshot && !raft_appendable(r, m->previndex, m->prevterm)) goto finish;
815+
if (!m->empty && !m->snapshot && !raft_appendable(r, m->previndex, m->prevterm)) goto finish;
816816

817817
if (reply.progress.entries > 0) {
818818
reply.term = RAFT_LOG(r, reply.progress.entries - 1).term;

0 commit comments

Comments
 (0)