You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Documentation suggests that from OTP 26, inet:setopts allows to set the reuseport. When trying to set the option with gen_udp:open, I get the following error:
After looking at otp/lib/kernel/src/inet.erl I noticed that function udp_options doesn't list reuseport as an available option, which is not the case for e.g. listen_options and indeed, gen_tcp:listen works fine with the reuseport:
Getting back to UDP, the option can be set via inet:setopts, but that doesn't help, as the next opened socket need to use reuseport as well, which must be set before binding to address:
…to maint
* raimo/kernel/gen_udp-pass-options/GH-7569/OTP-18734:
'dontroute' does not work on all platforms
Test more UDP socket options
Test UDP socket options
Allow missing options in open() calls
Typo introduced in erlang#7569 may may cause pg to crash when 'DOWN'
monitor message is in the queue while explicit leave is processed earlier.
Closeserlang#7807
Describe the bug
Documentation suggests that from OTP 26,
inet:setopts
allows to set thereuseport
. When trying to set the option withgen_udp:open
, I get the following error:After looking at
otp/lib/kernel/src/inet.erl
I noticed that functionudp_options
doesn't listreuseport
as an available option, which is not the case for e.g.listen_options
and indeed,gen_tcp:listen
works fine with thereuseport
:Getting back to UDP, the option can be set via
inet:setopts
, but that doesn't help, as the next opened socket need to usereuseport
as well, which must be set before binding to address:My workaround was to use
socket
module, which works as expected, but the above does not seem to be the desired behaviour.To Reproduce
Run
gen_udp:open(55001, [{reuseport, true}]).
.Expected behavior
I expect to be able to use
reuseport
option when opening UDP socket viagen_udp:open
.Affected versions
OTP 26.0.2
MacOS M1
Additional context
None.
The text was updated successfully, but these errors were encountered: