cleanup(netx): remove the DNSClient type (#660)
The DNSClient type existed because the Resolver type did not include CloseIdleConnections in its signature. Now that Resolver includes CloseIdleConnections, the DNSClient type has become unnecessary and can be safely removed. See https://github.com/ooni/probe/issues/1956.
This commit is contained in:
parent
730373cc75
commit
d3c6c11e48
4 changed files with 36 additions and 58 deletions
|
|
@ -17,7 +17,7 @@ import (
|
|||
|
||||
// Client is DNS, HTTP, and TCP client.
|
||||
type Client struct {
|
||||
dnsClient *netx.DNSClient
|
||||
dnsClient model.Resolver
|
||||
httpTransport model.HTTPTransport
|
||||
dialer model.Dialer
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ func NewClient(resolverURL string) (*Client, error) {
|
|||
return nil, err
|
||||
}
|
||||
return &Client{
|
||||
dnsClient: &configuration.DNSClient,
|
||||
dnsClient: configuration.DNSClient,
|
||||
httpTransport: netx.NewHTTPTransport(configuration.HTTPConfig),
|
||||
dialer: netx.NewDialer(configuration.HTTPConfig),
|
||||
}, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue