Fabrizio (Misto) Milo 12 years ago
parent
commit
11a7cd0bc2
1 changed files with 6 additions and 5 deletions
  1. 6 5
      etcd.go

+ 6 - 5
etcd.go

@@ -279,11 +279,12 @@ func startRaft(securityType int) {
 
 			// leader need to join self as a peer
 			for {
-				command := &JoinCommand{}
-				command.Name = raftServer.Name()
-				command.Hostname = hostname
-				command.RaftPort = raftPort
-				command.ClientPort = clientPort
+				command := &JoinCommand{
+					Name : raftServer.Name(),
+					Hostname : hostname,
+					RaftPort : raftPort,
+					ClientPort : clientPort,
+				}
 				_, err := raftServer.Do(command)
 				if err == nil {
 					break