Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :inet4 transport option to disable IPv4 fallback #425

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

ericmj
Copy link
Member

@ericmj ericmj commented Feb 12, 2024

Closes #395.

@coveralls
Copy link

coveralls commented Feb 12, 2024

Pull Request Test Coverage Report for Build 3833933daaaf4939848a730e8860f4a8e5d6812c-PR-425

Details

  • 0 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 87.818%

Totals Coverage Status
Change from base Build 74e0ec62d9efe26409fdb7c40181958291a72f3f: 0.3%
Covered Lines: 1276
Relevant Lines: 1453

💛 - Coveralls

Copy link
Contributor

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

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

Sweet! 🍬

lib/mint/http.ex Outdated Show resolved Hide resolved
Co-authored-by: Andrea Leopardi <[email protected]>
@ericmj ericmj merged commit 23b431b into main Feb 13, 2024
4 checks passed
@ericmj ericmj deleted the ericmj/inet4-option branch February 13, 2024 14:15
@@ -334,8 +335,11 @@ defmodule Mint.Core.Transport.SSL do
{:ok, sslsocket} ->
{:ok, sslsocket}

_error ->
_error when inet4? ->
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe stack mismatch shows up as :nxdomain so maybe there's no reason to try again on other error reasons? Or the idea is we get say :closed or :timeout and we might as well try on ipv4?

@dch you know more about this stuff, perhaps you have anything to add?

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.

Network errors doesn't surface correctly in IPv6-only network
4 participants