mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
simplify isLeader() logic
This commit is contained in:
parent
2ec6a679c2
commit
ad257ae179
|
@ -53,9 +53,6 @@ func (t *Topology) IsLeader() bool {
|
|||
if t.RaftServer!=nil {
|
||||
return t.RaftServer.State() == raft.Leader
|
||||
}
|
||||
if leader, e := t.Leader(); e == nil {
|
||||
return leader == t.RaftServer.Name()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue