Remove server addr from the context (#2722)

* more

Signed-off-by: Miek Gieben <miek@miek.nl>

* Remove server addr from the context

This was added twice, just leave the server which also holds the
address.

Conflicts with #2719 but should be easy to fix.

Signed-off-by: Miek Gieben <miek@miek.nl>

* doesn't need server context

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben 2019-03-25 17:46:44 +00:00 committed by Yong Tang
parent 45624a0c0a
commit 9a8c301a42
6 changed files with 22 additions and 42 deletions

View file

@ -26,7 +26,7 @@ func (m *Metrics) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
rw := dnstest.NewRecorder(w)
status, err := plugin.NextOrFailure(m.Name(), m.Next, ctx, rw, r)
vars.Report(ctx, state, zone, rcode.ToString(rw.Rcode), rw.Len, rw.Start)
vars.Report(WithServer(ctx), state, zone, rcode.ToString(rw.Rcode), rw.Len, rw.Start)
return status, err
}