Open
Description
Describe the bug
When trying to connect to a domain that only has an IPv6 address with gen_tcp, it throws an nxdomain error unless you pass the :inet6
option
To Reproduce
- Set up a domain that only has an IPv6 (AAAA) record
- Try to connect to it with gen_tcp:connect
Expected behavior
The domain gets resolved and connects
Affected versions
Erlang/OTP 27
Additional context
The issue was originally reported in the Elixir Redix library, but it was closed since it's an upstream OTP issue: