diff options
author | 2023-12-11 10:09:26 +0000 | |
---|---|---|
committer | 2023-12-11 10:09:26 +0000 | |
commit | 9b03840b428838ed5a8cbabd0e38640f847edcbe (patch) | |
tree | 7d4c74b57b2b8761b93c16e38adbe3da21954c10 /vendor/github.com/miekg/dns/xfr.go | |
parent | [chore]: Bump golang.org/x/oauth2 from 0.13.0 to 0.15.0 (#2438) (diff) | |
download | gotosocial-9b03840b428838ed5a8cbabd0e38640f847edcbe.tar.xz |
[chore]: Bump github.com/miekg/dns from 1.1.56 to 1.1.57 (#2439)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.56 to 1.1.57.
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.56...v1.1.57)
---
updated-dependencies:
- dependency-name: github.com/miekg/dns
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/miekg/dns/xfr.go')
-rw-r--r-- | vendor/github.com/miekg/dns/xfr.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/vendor/github.com/miekg/dns/xfr.go b/vendor/github.com/miekg/dns/xfr.go index 0a831c880..05b3c5add 100644 --- a/vendor/github.com/miekg/dns/xfr.go +++ b/vendor/github.com/miekg/dns/xfr.go @@ -80,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 @@ -131,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 |