-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Expected behaviour
- When connecting to a hostname with AAAA record, but no A record, from i host with IPv6-connectivity I would expect a connection via IPv6 to succeed, without needing additional configuration
- When connecting to a hostname with both AAAA record and A record from a host without any IPv4 connectivity i would expect a connection via IPv6 to be established, without needing additional configuration
Observed behaviour
- In first case:
{:error, %Mint.TransportError{reason: :nxdomain}}
- In second case:
{:error, %Mint.TransportError{reason: :enetunreach}}
Possible solutions
Try IPv6 first, if the hostname does have an AAAA record. If that fails with some kind of network error, try IPv4. The result of this check should probably be cached for performance reasons. A more complex, but also more robust solution would be to implement happy eyeballs, as specified in RFC 8305.
This issue seems very similar to benoitc/hackney#206, though hackney at least works properly in the first case. The hackney issue also goes into more detail on possible solutions.
Metadata
Metadata
Assignees
Labels
No labels