Copies the member data instead of referencing by pointer.

pull/2316/head
James Phillips 2016-08-30 16:54:21 -07:00
parent 84e8fc5848
commit cda2bd29a9
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
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. // 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() { for _, member := range op.srv.serfLAN.Members() {
valid, parts := agent.IsConsulServer(member) valid, parts := agent.IsConsulServer(member)
if !valid { if !valid {
@ -46,7 +46,7 @@ func (op *Operator) RaftGetConfiguration(args *structs.DCSpecificRequest, reply
} }
addr := (&net.TCPAddr{IP: member.Addr, Port: parts.Port}).String() addr := (&net.TCPAddr{IP: member.Addr, Port: parts.Port}).String()
serverMap[raft.ServerAddress(addr)] = &member serverMap[raft.ServerAddress(addr)] = member
} }
// Fill out the reply. // Fill out the reply.