From 2d0912ae19124629ac8a057b6b8ec8f6574fcbe9 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 11 Feb 2011 05:36:01 +0000 Subject: [PATCH] - attempt to fix some network performance issues --- source/glest_game/network/server_interface.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/glest_game/network/server_interface.cpp b/source/glest_game/network/server_interface.cpp index eb0c33c9..0d4dd8de 100644 --- a/source/glest_game/network/server_interface.cpp +++ b/source/glest_game/network/server_interface.cpp @@ -1187,6 +1187,17 @@ bool ServerInterface::launchGame(const GameSettings *gameSettings) { delete ftpServer; ftpServer = NULL; } + + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); + for(int i= 0; exitServer == false && i < GameConstants::maxPlayers; ++i) { + MutexSafeWrapper safeMutexSlot(&slotAccessorMutexes[i],string(__FILE__) + "_" + intToStr(__LINE__) + "_" + intToStr(i)); + ConnectionSlot *connectionSlot= slots[i]; + if(connectionSlot != NULL && + connectionSlot->isConnected()) { + connectionSlot->getSocket()->setBlock(true); + } + } + } SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__); return bOkToStart;