httpc is getting the wrong ipfamily by setting some options with httpc:set_option
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