mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
request.Request: remove useless function (#2714)
ErrorMessage was a very shallow function that didn't add anything. Remove it and remove its usage. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -77,7 +77,8 @@ func (g *GRPC) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
|
||||
if !state.Match(ret) {
|
||||
debug.Hexdumpf(ret, "Wrong reply for id: %d, %s %d", ret.Id, state.QName(), state.QType())
|
||||
|
||||
formerr := state.ErrorMessage(dns.RcodeFormatError)
|
||||
formerr := new(dns.Msg)
|
||||
formerr.SetRcode(state.Req, dns.RcodeFormatError)
|
||||
w.WriteMsg(formerr)
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user