Merge pull request #2316 from hashicorp/b-operator

Copies the member data instead of referencing by pointer.
This commit is contained in:
James Phillips 2016-08-30 17:29:53 -07:00 committed by GitHub
commit dc7273ed21
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ func (op *Operator) RaftGetConfiguration(args *structs.DCSpecificRequest, reply
}
// Index the Consul information about the servers.
serverMap := make(map[raft.ServerAddress]*serf.Member)
serverMap := make(map[raft.ServerAddress]serf.Member)
for _, member := range op.srv.serfLAN.Members() {
valid, parts := agent.IsConsulServer(member)
if !valid {
@ -46,7 +46,7 @@ func (op *Operator) RaftGetConfiguration(args *structs.DCSpecificRequest, reply
}
addr := (&net.TCPAddr{IP: member.Addr, Port: parts.Port}).String()
serverMap[raft.ServerAddress(addr)] = &member
serverMap[raft.ServerAddress(addr)] = member
}
// Fill out the reply.