summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-25 15:37:00 +0100
committermadmaxoft <github@xoft.cz>2014-01-25 15:37:00 +0100
commita2dfb2853718cc8bf73b954e5b678c12d93c815c (patch)
treeb793ef13c8793cf4943659d75fcbe10cb4074daf /Tools
parentRemoved unnecessary define (diff)
parentComm logging is available in both Debug and Release modes. (diff)
downloadcuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.tar
cuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.tar.gz
cuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.tar.bz2
cuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.tar.lz
cuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.tar.xz
cuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.tar.zst
cuberite-a2dfb2853718cc8bf73b954e5b678c12d93c815c.zip
Diffstat (limited to 'Tools')
-rw-r--r--Tools/ProtoProxy/Connection.cpp3
1 files changed, 2 insertions, 1 deletions
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);