Skip to content

Conversation

@LEdoian
Copy link
Contributor

@LEdoian LEdoian commented Oct 27, 2025

Fixes #2976

I am not sure this is a great way to fix this, but I think it only improves the current state – if the IPv6 does not work, it would fall back to IPv4. Only when IPv6 is broken it would wait till timeout.

I guess we could introduce an environment variable to force a particular IP version, but I am not sure if that is the recommended way.

Also, I am not sure if a test could be written for this, as this depends on the particular network configuration.

Looking forward to hearing feedback!

@benoitc
Copy link
Contributor

benoitc commented Oct 28, 2025

or go to hackney which has happy eyeball algorithm and support such fallback?

@LEdoian
Copy link
Contributor Author

LEdoian commented Oct 29, 2025

@benoitc Should rebar3 have external dependencies, though?

@benoitc
Copy link
Contributor

benoitc commented Oct 29, 2025

@LEdoian it has already some external depdencies, so why not :)

@benoitc
Copy link
Contributor

benoitc commented Oct 29, 2025

in any case this patch works here. It's very useful for ipv6 only machines.

Copy link
Collaborator

@ferd ferd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's a good catch of a thing we had missed!

We do use httpc because long term we hope to get rebar part of OTP, which means minimizing deps as much as we can, whenever we can.

@ferd ferd merged commit 049f80c into erlang:main Oct 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot download packages from Hex on IPv6-only network (failed_connect, … enetunreach)

3 participants