Browse Source

fix a bug when compare cluster len

Xiang Li 12 years ago
parent
commit
f470702b88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcd.go

+ 1 - 1
etcd.go

@@ -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)