From efe940e7c4e90df2cbf90812318d751b4301abfa Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Tue, 29 Mar 2016 19:38:26 -0700 Subject: [PATCH] Remove dead and incorrect code This functionality is handled further upstream in `trimUDPAnswers()` --- command/agent/dns.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/command/agent/dns.go b/command/agent/dns.go index 20a5430853..0a0f23e6dc 100644 --- a/command/agent/dns.go +++ b/command/agent/dns.go @@ -689,8 +689,6 @@ func (d *DNSServer) serviceNodeRecords(dc string, nodes structs.CheckServiceNode qType := req.Question[0].Qtype handled := make(map[string]struct{}) - // Post-shuffle: limit the number of nodes we return to the client - effectiveRecordLimit := lib.MinInt(d.config.UDPAnswerLimit, maxUDPAnswerLimit) for _, node := range nodes { // Start with the translated address but use the service address, // if specified. @@ -711,13 +709,6 @@ func (d *DNSServer) serviceNodeRecords(dc string, nodes structs.CheckServiceNode if records != nil { resp.Answer = append(resp.Answer, records...) } - - if len(resp.Answer) >= effectiveRecordLimit { - if d.config.EnableTruncate { - resp.Truncated = true - } - break - } } }