mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 08:13:30 +00:00
Fixed subtle issue with socket() on some distros
This commit is contained in:
@@ -963,7 +963,7 @@ void ILibAsyncSocket_ConnectTo(void* socketModule, struct sockaddr *localInterfa
|
||||
// Allocate a new socket
|
||||
if (module->RemoteAddress.sin6_family != AF_UNIX)
|
||||
{
|
||||
if (((struct sockaddr_in*)localInterface)->sin_family == AF_UNSPEC || (module->internalSocket = ILibGetSocket(localInterface, SOCK_STREAM, IPPROTO_TCP)) == 0)
|
||||
if (((struct sockaddr_in*)localInterface)->sin_family == AF_UNSPEC || (module->internalSocket = ILibGetSocket(localInterface, SOCK_STREAM, IPPROTO_TCP)) < 0)
|
||||
{
|
||||
module->internalSocket = 0;
|
||||
module->FinConnect = -1;
|
||||
|
||||
Reference in New Issue
Block a user