This commit is contained in:
Chris Lu
2019-02-15 00:09:48 -08:00
parent 74fb237727
commit 7103c1ab7e
3 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ func NewTopology(id string, seq sequence.Sequencer, volumeSizeLimit uint64, puls
}
func (t *Topology) IsLeader() bool {
if t.RaftServer!=nil {
if t.RaftServer != nil {
return t.RaftServer.State() == raft.Leader
}
if leader, e := t.Leader(); e == nil {