Remove dead and incorrect code

This functionality is handled further upstream in `trimUDPAnswers()`
This commit is contained in:
Sean Chittenden 2016-03-29 19:38:26 -07:00
parent d4f7f143f2
commit efe940e7c4
1 changed files with 0 additions and 9 deletions

View File

@ -689,8 +689,6 @@ func (d *DNSServer) serviceNodeRecords(dc string, nodes structs.CheckServiceNode
qType := req.Question[0].Qtype qType := req.Question[0].Qtype
handled := make(map[string]struct{}) 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 { for _, node := range nodes {
// Start with the translated address but use the service address, // Start with the translated address but use the service address,
// if specified. // if specified.
@ -711,13 +709,6 @@ func (d *DNSServer) serviceNodeRecords(dc string, nodes structs.CheckServiceNode
if records != nil { if records != nil {
resp.Answer = append(resp.Answer, records...) resp.Answer = append(resp.Answer, records...)
} }
if len(resp.Answer) >= effectiveRecordLimit {
if d.config.EnableTruncate {
resp.Truncated = true
}
break
}
} }
} }