fix https://github.com/chrislusf/seaweedfs/issues/2146
@ -70,6 +70,11 @@ func (t *Topology) IsLeader() bool {
if t.RaftServer.State() == raft.Leader {
return true
}
if leader, err := t.Leader(); err == nil {
if t.RaftServer.Name() == leader {
return false