Closed
Description
When pure Go resolver is used, net.Dial always send two DNS query (one for A record and another for AAAA), even if the network
parameter set to one of tcp4
, tcp6
, udp4
, udp6
. This will add extra latencies when making IPv4-only or IPv6-only connections. In the worst case, for example, a pure IPv4 host with firewall filtered out all AAAA queries, a dial with tcp4
will have to wait 10 second until AAAA query timed out.
The same problem was also found in cgo resolver (#25947), and it was fixed in c659be4.
My pull request will fix this.