summaryrefslogtreecommitdiff
path: root/vendor/github.com/miekg/dns/client.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-03-20 11:36:34 +0100
committerLibravatar GitHub <noreply@github.com>2023-03-20 11:36:34 +0100
commit276d77343898559c2525d3e53c94baf2119822b1 (patch)
tree3d99b120f21619a5f005333fc6312ec611ad1a21 /vendor/github.com/miekg/dns/client.go
parent[chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.22 to 1.0.23 (#1635) (diff)
downloadgotosocial-276d77343898559c2525d3e53c94baf2119822b1.tar.xz
[chore]: Bump github.com/miekg/dns from 1.1.51 to 1.1.52 (#1636)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.51 to 1.1.52. - [Release notes](https://github.com/miekg/dns/releases) - [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release) - [Commits](https://github.com/miekg/dns/compare/v1.1.51...v1.1.52) --- 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/client.go')
-rw-r--r--vendor/github.com/miekg/dns/client.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/vendor/github.com/miekg/dns/client.go b/vendor/github.com/miekg/dns/client.go
index f694ea589..9051ae007 100644
--- a/vendor/github.com/miekg/dns/client.go
+++ b/vendor/github.com/miekg/dns/client.go
@@ -106,7 +106,6 @@ func (c *Client) Dial(address string) (conn *Conn, err error) {
}
// DialContext connects to the address on the named network, with a context.Context.
-// For TLS over TCP (DoT) the context isn't used yet. This will be enabled when Go 1.18 is released.
func (c *Client) DialContext(ctx context.Context, address string) (conn *Conn, err error) {
// create a new dialer with the appropriate timeout
var d net.Dialer
@@ -127,15 +126,11 @@ func (c *Client) DialContext(ctx context.Context, address string) (conn *Conn, e
if useTLS {
network = strings.TrimSuffix(network, "-tls")
- // TODO(miekg): Enable after Go 1.18 is released, to be able to support two prev. releases.
- /*
- tlsDialer := tls.Dialer{
- NetDialer: &d,
- Config: c.TLSConfig,
- }
- conn.Conn, err = tlsDialer.DialContext(ctx, network, address)
- */
- conn.Conn, err = tls.DialWithDialer(&d, network, address, c.TLSConfig)
+ tlsDialer := tls.Dialer{
+ NetDialer: &d,
+ Config: c.TLSConfig,
+ }
+ conn.Conn, err = tlsDialer.DialContext(ctx, network, address)
} else {
conn.Conn, err = d.DialContext(ctx, network, address)
}