Revert "be sure to close connection after completion of xfr out. (#2866)" (#2872)

This reverts commit a657e1f661.
This commit is contained in:
Miek Gieben
2019-06-07 15:29:42 +01:00
committed by GitHub
parent a657e1f661
commit 458e778113

View File

@@ -33,10 +33,7 @@ func (x Xfr) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in
ch := make(chan *dns.Envelope)
defer close(ch)
tr := new(dns.Transfer)
go func() {
tr.Out(w, r, ch)
w.Close()
}()
go tr.Out(w, r, ch)
j, l := 0, 0
records = append(records, records[0]) // add closing SOA to the end
@@ -54,6 +51,7 @@ func (x Xfr) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in
}
w.Hijack()
// w.Close() // Client closes connection
return dns.RcodeSuccess, nil
}