fix a bug when compare cluster len

This commit is contained in:
Xiang Li 2013-07-13 21:02:25 -07:00
parent ac945c77de
commit f470702b88

View File

@ -223,7 +223,7 @@ func startRaft(securityType int) {
if raftServer.IsLogEmpty() {
// start as a leader in a new cluster
if len(cluster) == 1 && cluster[0] == "" {
if len(cluster) == 0 {
raftServer.StartLeader()
time.Sleep(time.Millisecond * 20)