Fix: ipv6 dns crash

This commit is contained in:
Dreamacro
2020-02-17 20:11:46 +08:00
parent 7b48138ad0
commit df0ab6aa8e
2 changed files with 7 additions and 8 deletions

View File

@ -26,7 +26,7 @@ func (c *client) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D.Msg, err
network = "tcp"
}
ip, err := c.r.ResolveIPv4(c.host)
ip, err := c.r.ResolveIP(c.host)
if err != nil {
return nil, err
}