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

httpc is getting the wrong ipfamily by setting some options with httpc:set_option #8829

Open
cwmichi opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS

Comments

@cwmichi
Copy link

cwmichi commented Sep 19, 2024

Describe the bug
httpc profile with set_option to set some options would change the ipfamily from inet6 back to inet. The order of setting some options would change the ipfamily in the state of the httpc profile.

To Reproduce

When I am setting at first the ipfamily inet6 and then the max_session the ipfamily got changed by 5> httpc:set_option(max_sessions,100,inet6). back to inet - this is wrong. If a change the order of set_option then it would work, why?

1> observer:start().
ok
2> inets:start().
ok
3> {ok, _} = inets:start(httpc, [{profile, inet6}]).
{ok,<0.119.0>}
4> httpc:set_option(ipfamily,inet6,inet6).
ok
5> httpc:set_option(max_sessions,100,inet6).
ok
6>

Please look into the observer:
observer -> httpc_inet6 process -> option ipfamily = inet
it's inet, not inet6 anymore!


Step2):

1> observer:start().
ok
2> inets:start().
ok
3> {ok, _} = inets:start(httpc, [{profile, inet6}]).
{ok,<0.119.0>}
4> httpc:set_option(max_sessions,100,inet6).
ok
5> httpc:set_option(ipfamily,inet6,inet6).
ok
6>
Please look into the observer:
observer -> httpc_inet6 process -> option ipfamily = inet6
it's inet6

Could you also reproduce this?

Expected behavior
The option setting should not change the inet6 ipfamily

Affected versions
OTP 26.2.5.3

@cwmichi cwmichi added the bug Issue is reported as a bug label Sep 19, 2024
@IngelaAndin IngelaAndin added the team:PS Assigned to OTP team PS label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

3 participants