Skip to content

fix: allow :finch option with IPv6 URLs#538

Merged
wojtekmach merged 2 commits into
wojtekmach:mainfrom
meox:fix-inet6-finch-pool
Apr 14, 2026
Merged

fix: allow :finch option with IPv6 URLs#538
wojtekmach merged 2 commits into
wojtekmach:mainfrom
meox:fix-inet6-finch-pool

Conversation

@meox
Copy link
Copy Markdown
Contributor

@meox meox commented Apr 14, 2026

Req auto-sets inet6: true when the URL host contains : (e.g.
http://[::1]:8080/). The finch_name/1 guard treated :inet6 as a
custom pool option, causing it to raise "cannot set both :finch and
:connect_options" when a named Finch pool was also provided.

Narrow the guard to only reject :connect_options, which would
genuinely be ignored by a pre-configured Finch instance. The :inet6
flag is orthogonal to pool selection and should not conflict.

This fixes connection pool isolation for services that use separate
named Finch pools when the target is an IPv6 address.

Copy link
Copy Markdown
Owner

@wojtekmach wojtekmach left a comment

Choose a reason for hiding this comment

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

Good catch, thank you!

Comment thread test/req/finch_test.exs Outdated
Comment thread test/req/finch_test.exs Outdated
@wojtekmach wojtekmach merged commit 923aacf into wojtekmach:main Apr 14, 2026
2 checks passed
@wojtekmach
Copy link
Copy Markdown
Owner

Thank you!

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.

2 participants