- attempt to fix client timeout issues in client connected menu when downloading files
This commit is contained in:
parent
0c7d089b93
commit
a3e3a7d59d
|
@ -2051,14 +2051,17 @@ void MenuStateConnectedGame::update() {
|
||||||
pingCount >= 3 && clientInterface->getLastPingLag() >= (GameConstants::networkPingInterval * 3)) {
|
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__);
|
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();
|
MutexSafeWrapper safeMutexFTPProgress((ftpClientThread != NULL ? ftpClientThread->getProgressMutex() : NULL),string(__FILE__) + "_" + intToStr(__LINE__));
|
||||||
const vector<string> languageList = clientInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
if(fileFTPProgressList.empty() == true) {
|
||||||
for(unsigned int i = 0; i < languageList.size(); ++i) {
|
Lang &lang= Lang::getInstance();
|
||||||
//string playerNameStr = getHumanPlayerName();
|
const vector<string> languageList = clientInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
||||||
clientInterface->sendTextMessage(lang.get("ConnectionTimedOut",languageList[i]),-1,false,languageList[i]);
|
for(unsigned int i = 0; i < languageList.size(); ++i) {
|
||||||
sleep(1);
|
//string playerNameStr = getHumanPlayerName();
|
||||||
clientInterface->close();
|
clientInterface->sendTextMessage(lang.get("ConnectionTimedOut",languageList[i]),-1,false,languageList[i]);
|
||||||
}
|
sleep(1);
|
||||||
|
clientInterface->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pingCount++;
|
pingCount++;
|
||||||
|
|
Loading…
Reference in New Issue