mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-29 06:03:28 +00:00
(netplay.c) Reuse it another time
This commit is contained in:
parent
f4762f6f33
commit
b979af0a8c
@ -770,13 +770,7 @@ static bool init_udp_socket(netplay_t *netplay, const char *server,
|
||||
if (!server)
|
||||
{
|
||||
/* Not sure if we have to do this for UDP, but hey :) */
|
||||
int yes = 1;
|
||||
|
||||
setsockopt(netplay->udp_fd, SOL_SOCKET, SO_REUSEADDR,
|
||||
(const char*)&yes, sizeof(int));
|
||||
|
||||
if (bind(netplay->udp_fd, netplay->addr->ai_addr,
|
||||
netplay->addr->ai_addrlen) < 0)
|
||||
if (!socket_bind(netplay->udp_fd, (void*)netplay->addr))
|
||||
{
|
||||
RARCH_ERR("Failed to bind socket.\n");
|
||||
socket_close(netplay->udp_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user