mirror of https://github.com/status-im/consul.git
Remove dead and incorrect code
This functionality is handled further upstream in `trimUDPAnswers()`
This commit is contained in:
parent
d4f7f143f2
commit
efe940e7c4
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue