diff options
author | Micael Karlberg <bmk@erlang.org> | 2021-11-16 18:32:14 +0100 |
---|---|---|
committer | Micael Karlberg <bmk@erlang.org> | 2021-11-17 15:11:59 +0100 |
commit | 2a6ac6f3f027fcab6d607599e82714e930d9fde2 (patch) | |
tree | 2990f40126c94c20e840efe48da0400bff4507dc /erts/emulator/drivers | |
parent | abe8285f0b4c594d610f72df6890f6851b89f248 (diff) | |
download | erlang-2a6ac6f3f027fcab6d607599e82714e930d9fde2.tar.gz |
[erts|inet-driver] Remove REUSEADDR windows ifdef'ing
The REUSEADDR option was disabled for Windows. The reason for
this is that this option *had* issues on Windows, specifically
Windows XP, which we no longer support.
Therefor, we now treat this option the same way on windows as
we do on all other platforms.
OTP-17447
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 00421d0c73..ed098abdbb 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -6638,15 +6638,16 @@ static int inet_set_opts(inet_descriptor* desc, char* ptr, int len) desc->delimiter = (char)ival; continue; - case INET_OPT_REUSEADDR: -#ifdef __WIN32__ - continue; /* Bjorn says */ -#else - type = SO_REUSEADDR; + /* The behaviour changed in Windows Server 2003. + * Now it works as the combo of `SO_REUSEADDR` and + * `SO_REUSEPORT` does on *BSD. + * This option was "dangerous" only in Windows XP, + * which we don't support anymore! + */ + case INET_OPT_REUSEADDR: type = SO_REUSEADDR; DEBUGF(("inet_set_opts(%p): s=%d, SO_REUSEADDR=%d\r\n", desc->port, desc->s,ival)); break; -#endif case INET_OPT_KEEPALIVE: type = SO_KEEPALIVE; DEBUGF(("inet_set_opts(%p): s=%d, SO_KEEPALIVE=%d\r\n", desc->port, desc->s, ival)); |