diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index bf9cf448..6ce5d050 100644 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -1782,8 +1782,8 @@ NetworkMessageType ClientInterface::waitForMessage(int waitMicroseconds) return msg; } // Sleep every x milli-seconds we wait to let other threads work - else if(chrono.getMillis() % 5 == 0) { - sleep(1); + else if(chrono.getMillis() % 50 == 0) { + sleep(5); } //sleep(waitSleepTime); diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 22ebe94c..5df10090 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -1500,14 +1500,14 @@ int Socket::peek(void *data, int dataSize,bool mustGetData,int *pLastSocketError //if(chrono.getMillis() > 1) printf("In [%s::%s Line: %d] action running for msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,(long long int)chrono.getMillis()); if(isSocketValid() == true) { // Chrono recvTimer(true); - SafeSocketBlockToggleWrapper safeUnblock(this, false); + //SafeSocketBlockToggleWrapper safeUnblock(this, false); errno = 0; err = recv(sock, reinterpret_cast(data), dataSize, MSG_PEEK); lastSocketError = getLastSocketError(); if(pLastSocketError != NULL) { *pLastSocketError = lastSocketError; } - safeUnblock.Restore(); + //safeUnblock.Restore(); // if(recvTimer.getMillis() > 1000 || (err <= 0 && lastSocketError != 0 && lastSocketError != PLATFORM_SOCKET_TRY_AGAIN)) { // printf("#1 PEEK err = %d lastSocketError = %d ms: %lld\n",err,lastSocketError,(long long int)recvTimer.getMillis()); @@ -1563,14 +1563,14 @@ int Socket::peek(void *data, int dataSize,bool mustGetData,int *pLastSocketError MutexSafeWrapper safeMutex(dataSynchAccessorRead,CODE_AT_LINE); // Chrono recvTimer(true); - SafeSocketBlockToggleWrapper safeUnblock(this, false); + //SafeSocketBlockToggleWrapper safeUnblock(this, false); errno = 0; err = recv(sock, reinterpret_cast(data), dataSize, MSG_PEEK); lastSocketError = getLastSocketError(); if(pLastSocketError != NULL) { *pLastSocketError = lastSocketError; } - safeUnblock.Restore(); + //safeUnblock.Restore(); // if(recvTimer.getMillis() > 1000 || (err <= 0 && lastSocketError != 0 && lastSocketError != PLATFORM_SOCKET_TRY_AGAIN)) { // printf("#2 PEEK err = %d lastSocketError = %d ms: %lld\n",err,lastSocketError,(long long int)recvTimer.getMillis());