This commit is contained in:
twinaphex 2016-05-02 01:23:42 +02:00
parent 8c28ec0867
commit 72ec71a71c

View File

@ -759,11 +759,13 @@ static bool init_tcp_socket(netplay_t *netplay, const char *server,
static bool init_udp_socket(netplay_t *netplay, const char *server,
uint16_t port)
{
netplay->udp_fd = socket_init((void**)&netplay->addr, port, server, SOCKET_TYPE_DATAGRAM);
int fd = socket_init((void**)&netplay->addr, port, server, SOCKET_TYPE_DATAGRAM);
if (netplay->udp_fd < 0)
if (fd < 0)
goto error;
netplay->udp_fd = fd;
if (!server)
{
/* Not sure if we have to do this for UDP, but hey :) */