Fix: don't resolve AAAA record when ipv6 is false and use go dns resolver

This commit is contained in:
Dreamacro
2021-04-01 18:03:30 +08:00
parent 1f593d37fb
commit 4ad9761b32
2 changed files with 18 additions and 17 deletions

View File

@ -145,7 +145,7 @@ func (r *Resolver) exchangeWithoutCache(m *D.Msg) (msg *D.Msg, err error) {
}
func (r *Resolver) batchExchange(clients []dnsClient, m *D.Msg) (msg *D.Msg, err error) {
fast, ctx := picker.WithTimeout(context.Background(), time.Second*5)
fast, ctx := picker.WithTimeout(context.Background(), resolver.DefaultDNSTimeout)
for _, client := range clients {
r := client
fast.Go(func() (interface{}, error) {