Skip to content

Commit

Permalink
Fix set_reuse_address on non-Windows platforms.
Browse files Browse the repository at this point in the history
Broken after cae0d88 .
  • Loading branch information
Faless committed Feb 19, 2020
1 parent 28bb280 commit 19ef28a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/unix/net_socket_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down

0 comments on commit 19ef28a

Please sign in to comment.