Skip to content
Snippets Groups Projects
Commit 8800b5c0 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

refactor: check raft.state directly

parent e9f48c4e
No related branches found
No related tags found
3 merge requests!163Feat/voter switchover,!162Refactor/events and more,!158Refactor join loop (v2)
......@@ -651,8 +651,7 @@ fn raft_main_loop(
// is appended to the raft log immediately
// instead of sending `MsgPropose` over the
// network.
let status = raw_node.status();
if status.ss.raft_state != RaftStateRole::Leader {
if raw_node.raft.state != RaftStateRole::Leader {
break Some("not a leader");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment