dnsforward: imp code

This commit is contained in:
Dimitry Kolyshev 2023-11-30 14:55:15 +02:00
parent 5bd6805d54
commit a6c5079779
2 changed files with 1 additions and 2 deletions

View File

@ -49,7 +49,6 @@ func (s *Server) DialContext(ctx context.Context, network, addr string) (conn ne
var dialErrs []error
for _, ip := range ips {
addrPort := netip.AddrPortFrom(ip, uint16(port))
// addr = net.JoinHostPort(a.String(), port)
conn, err = dialer.DialContext(ctx, network, addrPort.String())
if err != nil {
dialErrs = append(dialErrs, err)

View File

@ -332,7 +332,7 @@ func (s *Server) AddrProcConfig() (c *client.DefaultAddrProcConfig) {
// Resolve gets IP addresses by host name from an upstream server. No
// request/response filtering is performed. Query log and Stats are not
// updated. This method may be called before Start().
// updated. This method may be called before [Server.Start].
func (s *Server) Resolve(ctx context.Context, net, host string) (addr []netip.Addr, err error) {
s.serverLock.RLock()
defer s.serverLock.RUnlock()