Browse Source

do not try the empty machine name

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

+ 3 - 1
etcd.go

@@ -252,7 +252,9 @@ func startRaft(securityType int) {
 			raftServer.StartFollower()
 			raftServer.StartFollower()
 
 
 			for _, machine := range cluster {
 			for _, machine := range cluster {
-
+				if len(machine) == 0 {
+					continue
+				}
 				err = joinCluster(raftServer, machine)
 				err = joinCluster(raftServer, machine)
 				if err != nil {
 				if err != nil {
 					debug("cannot join to cluster via machine %s %s", machine, err)
 					debug("cannot join to cluster via machine %s %s", machine, err)