Skip to content

Commit

Permalink
Merge branch 'master' into reset-pre-candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
siddontang authored Jun 30, 2018
2 parents 025dcc6 + b8d746a commit 2193ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/single_mem_node/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn on_ready(r: &mut RawNode<MemStorage>, cbs: &mut HashMap<u8, ProposeCallback>)
// The Raft is ready, we can do something now.
let mut ready = r.ready();

let is_leader = r.raft.leader_id == 1;
let is_leader = r.raft.leader_id == r.raft.id;
if is_leader {
// If the peer is leader, the leader can send messages to other followers ASAP.
let msgs = ready.messages.drain(..);
Expand Down

0 comments on commit 2193ca3

Please sign in to comment.