mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: correct hasLeader
This commit is contained in:
parent
72c65e74f5
commit
75dce35a5d
@ -162,7 +162,7 @@ func newRaft(id int64, peers []int64) *raft {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *raft) hasLeader() bool { return r.state != stateCandidate }
|
||||
func (r *raft) hasLeader() bool { return r.lead != none }
|
||||
|
||||
func (r *raft) propose(data []byte) {
|
||||
r.Step(Message{From: r.id, Type: msgProp, Entries: []Entry{{Data: data}}})
|
||||
|
Loading…
x
Reference in New Issue
Block a user