diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index 5e8f2400..c2043a78 100644 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -1922,8 +1922,8 @@ NetworkMessageType ClientInterface::waitForMessage(int waitMicroseconds) return msg; } // Sleep every x milli-seconds we wait to let other threads work - else if(chrono.getMillis() % 4 == 0) { - sleep(2); + else if(chrono.getMillis() % 10 == 0) { + sleep(3); } } diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 3cf72d76..0bf023e2 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -1700,12 +1700,12 @@ bool Socket::isReadable(bool lockMutex) { fd_set set; FD_ZERO(&set); - FD_SET(sock, &set); MutexSafeWrapper safeMutex(NULL,CODE_AT_LINE); if(lockMutex == true) { safeMutex.setMutex(dataSynchAccessorRead,CODE_AT_LINE); } + FD_SET(sock, &set); int i = select((int)sock + 1, &set, NULL, NULL, &tv); safeMutex.ReleaseLock(); @@ -1735,12 +1735,12 @@ bool Socket::isWritable(struct timeval *timeVal, bool lockMutex) { fd_set set; FD_ZERO(&set); - FD_SET(sock, &set); MutexSafeWrapper safeMutex(NULL,CODE_AT_LINE); if(lockMutex == true) { safeMutex.setMutex(dataSynchAccessorWrite,CODE_AT_LINE); } + FD_SET(sock, &set); int i = select((int)sock + 1, NULL, &set, NULL, &tv); safeMutex.ReleaseLock();