From d8014d1ed8dd2374f77d670a1368958c8a10541a Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 24 Jan 2014 18:51:15 +0100 Subject: ProtoProxy: Fixed connection on *nix. --- Tools/ProtoProxy/Connection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Tools/ProtoProxy/Connection.cpp') diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index cd66e2dfd..b63935f38 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -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); -- cgit v1.2.3