mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 06:29:59 +00:00
TUN-8685: Bump coredns dependency
Closes TUN-8685
This commit is contained in:
19
vendor/github.com/miekg/dns/xfr.go
generated
vendored
19
vendor/github.com/miekg/dns/xfr.go
generated
vendored
@@ -44,7 +44,6 @@ func (t *Transfer) tsigProvider() TsigProvider {
|
||||
// dnscon := &dns.Conn{Conn:con}
|
||||
// transfer = &dns.Transfer{Conn: dnscon}
|
||||
// channel, err := transfer.In(message, master)
|
||||
//
|
||||
func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
|
||||
switch q.Question[0].Qtype {
|
||||
case TypeAXFR, TypeIXFR:
|
||||
@@ -81,8 +80,13 @@ func (t *Transfer) In(q *Msg, a string) (env chan *Envelope, err error) {
|
||||
|
||||
func (t *Transfer) inAxfr(q *Msg, c chan *Envelope) {
|
||||
first := true
|
||||
defer t.Close()
|
||||
defer close(c)
|
||||
defer func() {
|
||||
// First close the connection, then the channel. This allows functions blocked on
|
||||
// the channel to assume that the connection is closed and no further operations are
|
||||
// pending when they resume.
|
||||
t.Close()
|
||||
close(c)
|
||||
}()
|
||||
timeout := dnsTimeout
|
||||
if t.ReadTimeout != 0 {
|
||||
timeout = t.ReadTimeout
|
||||
@@ -132,8 +136,13 @@ func (t *Transfer) inIxfr(q *Msg, c chan *Envelope) {
|
||||
axfr := true
|
||||
n := 0
|
||||
qser := q.Ns[0].(*SOA).Serial
|
||||
defer t.Close()
|
||||
defer close(c)
|
||||
defer func() {
|
||||
// First close the connection, then the channel. This allows functions blocked on
|
||||
// the channel to assume that the connection is closed and no further operations are
|
||||
// pending when they resume.
|
||||
t.Close()
|
||||
close(c)
|
||||
}()
|
||||
timeout := dnsTimeout
|
||||
if t.ReadTimeout != 0 {
|
||||
timeout = t.ReadTimeout
|
||||
|
Reference in New Issue
Block a user