From cda2bd29a90846f7ded55933763d7993314626da Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 30 Aug 2016 16:54:21 -0700 Subject: [PATCH] Copies the member data instead of referencing by pointer. --- consul/operator_endpoint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consul/operator_endpoint.go b/consul/operator_endpoint.go index 2add169a27..027e1d1e4e 100644 --- a/consul/operator_endpoint.go +++ b/consul/operator_endpoint.go @@ -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.