Explorar el Código

do not try the empty machine name

Xiang Li hace 12 años
padre
commit
0c2ffa84af
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      etcd.go

+ 3 - 1
etcd.go

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