summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-02-19 10:15:36 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-02-19 10:15:36 +0100
commit19ef28a61494d06a001c983a50e5a33bb0c7615b (patch)
tree51dbc87c7e1e44c6d1fc7d07fd955caa93a65838
parent28bb2806f1afac8d256291a6b86352e11f074697 (diff)
Fix set_reuse_address on non-Windows platforms.
Broken after cae0d8853d7a373ad8720289c12c7c2e7b5ef240 .
-rw-r--r--drivers/unix/net_socket_posix.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index f7e412be63..4adeeb1d9b 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -676,8 +676,6 @@ void NetSocketPosix::set_reuse_address_enabled(bool p_enabled) {
// On Windows, enabling SO_REUSEADDR actually would also enable reuse port, very bad on TCP. Denying...
// Windows does not have this option, SO_REUSEADDR in this magical world means SO_REUSEPORT
#ifndef WINDOWS_ENABLED
- if (_is_stream)
- return;
int par = p_enabled ? 1 : 0;
if (setsockopt(_sock, SOL_SOCKET, SO_REUSEADDR, SOCK_CBUF(&par), sizeof(int)) < 0) {
WARN_PRINT("Unable to set socket REUSEADDR option!");