ProtoProxy: Fixed connection on *nix.
This commit is contained in:
parent
e75f979e01
commit
d8014d1ed8
@ -243,7 +243,8 @@ void cConnection::Run(void)
|
|||||||
FD_ZERO(&ReadFDs);
|
FD_ZERO(&ReadFDs);
|
||||||
FD_SET(m_ServerSocket, &ReadFDs);
|
FD_SET(m_ServerSocket, &ReadFDs);
|
||||||
FD_SET(m_ClientSocket, &ReadFDs);
|
FD_SET(m_ClientSocket, &ReadFDs);
|
||||||
int res = select(2, &ReadFDs, NULL, NULL, NULL);
|
SOCKET MaxSocket = std::max(m_ServerSocket, m_ClientSocket);
|
||||||
|
int res = select(MaxSocket + 1, &ReadFDs, NULL, NULL, NULL);
|
||||||
if (res <= 0)
|
if (res <= 0)
|
||||||
{
|
{
|
||||||
printf("select() failed: %d; aborting client", SocketError);
|
printf("select() failed: %d; aborting client", SocketError);
|
||||||
|
Loading…
Reference in New Issue
Block a user