Uncomment return and don't close peer socket if created

This commit is contained in:
Sheldon Lee 2024-11-05 20:59:11 +08:00
parent 9114ea6691
commit 759a99edcf

4
net.c
View File

@ -98,9 +98,7 @@ int net_listen_clients()
"Peer socket address:\n%s:%d", "Peer socket address:\n%s:%d",
inet_ntoa(peer_info.addr.sin_addr), inet_ntoa(peer_info.addr.sin_addr),
ntohs(peer_info.addr.sin_port)); ntohs(peer_info.addr.sin_port));
close(peer_info.socket); return 1;
peer_info.socket = -1;
//return 1;
} }
peer_info.socket = socket(AF_INET, SOCK_DGRAM, 0); peer_info.socket = socket(AF_INET, SOCK_DGRAM, 0);