diff options
author | madmaxoft <github@xoft.cz> | 2014-01-25 15:37:00 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-25 15:37:00 +0100 |
commit | a2dfb2853718cc8bf73b954e5b678c12d93c815c (patch) | |
tree | b793ef13c8793cf4943659d75fcbe10cb4074daf /Tools/ProtoProxy | |
parent | Removed unnecessary define (diff) | |
parent | Comm logging is available in both Debug and Release modes. (diff) | |
download | cuberite-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 '')
-rw-r--r-- | Tools/ProtoProxy/Connection.cpp | 3 |
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); |