1
0
Fork 0

ProtoProxy: Fixed connection on *nix.

This commit is contained in:
madmaxoft 2014-01-24 18:51:15 +01:00
parent e75f979e01
commit d8014d1ed8
1 changed files with 2 additions and 1 deletions

View File

@ -243,7 +243,8 @@ void cConnection::Run(void)
FD_ZERO(&ReadFDs);
FD_SET(m_ServerSocket, &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)
{
printf("select() failed: %d; aborting client", SocketError);