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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user