diff --git a/xfr.go b/xfr.go index bb4ca3d8..43970e64 100644 --- a/xfr.go +++ b/xfr.go @@ -182,14 +182,17 @@ func (t *Transfer) inIxfr(q *Msg, c chan *Envelope) { // // ch := make(chan *dns.Envelope) // tr := new(dns.Transfer) -// go tr.Out(w, r, ch) +// var wg sync.WaitGroup +// go func() { +// tr.Out(w, r, ch) +// wg.Done() +// }() // ch <- &dns.Envelope{RR: []dns.RR{soa, rr1, rr2, rr3, soa}} // close(ch) -// w.Hijack() -// // w.Close() // Client closes connection +// wg.Wait() // wait until everything is written out +// w.Close() // close connection // -// The server is responsible for sending the correct sequence of RRs through the -// channel ch. +// The server is responsible for sending the correct sequence of RRs through the channel ch. func (t *Transfer) Out(w ResponseWriter, q *Msg, ch chan *Envelope) error { for x := range ch { r := new(Msg)