Skip to content

Commit

Permalink
Fix timer wrong reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jan 14, 2024
1 parent 893ea5a commit 4ded399
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions raftify/src/raft_node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,7 @@ impl<
}
};

let response_seq = serialize(&response_seq)?;
self.raw_node.propose(response_seq, proposal)?;
self.raw_node.propose(serialize(&response_seq)?, proposal)?;
}

Ok(())
Expand Down Expand Up @@ -1249,7 +1248,7 @@ impl<
let elapsed = now.elapsed();
now = Instant::now();
if elapsed > tick_timer {
tick_timer = Duration::from_millis(100);
tick_timer = fixed_tick_timer;
self.raw_node.tick();
} else {
tick_timer -= elapsed;
Expand Down

0 comments on commit 4ded399

Please sign in to comment.