diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index 932dda92..b4c8232f 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -2051,14 +2051,17 @@ void MenuStateConnectedGame::update() { pingCount >= 3 && clientInterface->getLastPingLag() >= (GameConstants::networkPingInterval * 3)) { if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - Lang &lang= Lang::getInstance(); - const vector languageList = clientInterface->getGameSettings()->getUniqueNetworkPlayerLanguages(); - for(unsigned int i = 0; i < languageList.size(); ++i) { - //string playerNameStr = getHumanPlayerName(); - clientInterface->sendTextMessage(lang.get("ConnectionTimedOut",languageList[i]),-1,false,languageList[i]); - sleep(1); - clientInterface->close(); - } + MutexSafeWrapper safeMutexFTPProgress((ftpClientThread != NULL ? ftpClientThread->getProgressMutex() : NULL),string(__FILE__) + "_" + intToStr(__LINE__)); + if(fileFTPProgressList.empty() == true) { + Lang &lang= Lang::getInstance(); + const vector languageList = clientInterface->getGameSettings()->getUniqueNetworkPlayerLanguages(); + for(unsigned int i = 0; i < languageList.size(); ++i) { + //string playerNameStr = getHumanPlayerName(); + clientInterface->sendTextMessage(lang.get("ConnectionTimedOut",languageList[i]),-1,false,languageList[i]); + sleep(1); + clientInterface->close(); + } + } } pingCount++;