Fix second write when responding with extra section

This commit is contained in:
Daniel
2020-09-25 11:07:36 +02:00
parent ee3c046656
commit a498611a2a
2 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ func writeDNSResponse(w dns.ResponseWriter, m *dns.Msg) (err error) {
}()
err = w.WriteMsg(m)
if err == nil {
if err != nil {
// If we receive an error we might have exceeded the message size with all
// our extra information records. Retry again without the extra section.
m.Extra = nil