- calculate megapack techtree CRC first if it exists in the users techtrees
This commit is contained in:
parent
daf8f42f7e
commit
1ffc7d99d4
|
@ -66,7 +66,15 @@ void FileCRCPreCacheThread::execute() {
|
||||||
vector<string> techPaths;
|
vector<string> techPaths;
|
||||||
findDirs(techDataPaths, techPaths);
|
findDirs(techDataPaths, techPaths);
|
||||||
if(techPaths.empty() == false) {
|
if(techPaths.empty() == false) {
|
||||||
|
// Always calc megapack first so its up to date sooner
|
||||||
|
const string megapackTechtreeName = "megapack";
|
||||||
|
vector<string>::iterator iterFindMegaPack = std::find(techPaths.begin(),techPaths.end(),megapackTechtreeName);
|
||||||
|
if(iterFindMegaPack != techPaths.end()) {
|
||||||
|
techPaths.erase(iterFindMegaPack);
|
||||||
|
techPaths.insert(techPaths.begin(),megapackTechtreeName);
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] Found megapack techtree and placing it at the TOP of the list\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
}
|
||||||
unsigned int techsPerWorker = (techPaths.size() / MAX_FileCRCPreCacheThread_WORKER_THREADS);
|
unsigned int techsPerWorker = (techPaths.size() / MAX_FileCRCPreCacheThread_WORKER_THREADS);
|
||||||
if(techPaths.size() % MAX_FileCRCPreCacheThread_WORKER_THREADS != 0) {
|
if(techPaths.size() % MAX_FileCRCPreCacheThread_WORKER_THREADS != 0) {
|
||||||
techsPerWorker++;
|
techsPerWorker++;
|
||||||
|
|
|
@ -1445,7 +1445,7 @@ bool Socket::isConnected() {
|
||||||
int err = peek(&tmp, 1, false);
|
int err = peek(&tmp, 1, false);
|
||||||
if(err <= 0 && err != PLATFORM_SOCKET_TRY_AGAIN) {
|
if(err <= 0 && err != PLATFORM_SOCKET_TRY_AGAIN) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] ERROR Peek failed, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,err,getLastSocketErrorFormattedText().c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] ERROR Peek failed, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,err,getLastSocketErrorFormattedText().c_str());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugError,"SOCKET DISCONNECTED In [%s::%s Line: %d] ERROR Peek failed, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,err,getLastSocketErrorFormattedText().c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) SystemFlags::OutputDebug(SystemFlags::debugError,"SOCKET DISCONNECTED In [%s::%s Line: %d] ERROR Peek failed, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,err,getLastSocketErrorFormattedText().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue