Disable SO_REUSEADDR for UDP.

It allows binding multiple sockets to the same ADDR:PORT (unlike TCP,
which still requires different ADDR:PORT combinations).

(cherry picked from commit 4b6a35c74a)
This commit is contained in:
Fabio Alessandrelli 2020-11-27 14:12:34 +01:00 committed by Rémi Verschelde
parent dbb69f8f49
commit f6cca77d8f
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -178,7 +178,6 @@ Error PacketPeerUDP::listen(int p_port, const IP_Address &p_bind_address, int p_
return ERR_CANT_CREATE; return ERR_CANT_CREATE;
_sock->set_blocking_enabled(false); _sock->set_blocking_enabled(false);
_sock->set_reuse_address_enabled(true);
_sock->set_broadcasting_enabled(broadcast); _sock->set_broadcasting_enabled(broadcast);
err = _sock->bind(p_bind_address, p_port); err = _sock->bind(p_bind_address, p_port);