mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 23:45:14 +02:00
small fix for initial ping time
This commit is contained in:
@@ -696,9 +696,9 @@ float Socket::getThreadedPingMS(std::string host) {
|
|||||||
float result = -1;
|
float result = -1;
|
||||||
if(pingCache.find(host) == pingCache.end()) {
|
if(pingCache.find(host) == pingCache.end()) {
|
||||||
MutexSafeWrapper safeMutex(&pingThreadAccessor);
|
MutexSafeWrapper safeMutex(&pingThreadAccessor);
|
||||||
pingCache[host]=-1;
|
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
result = getAveragePingMS(host, 1);
|
result = getAveragePingMS(host, 1);
|
||||||
|
pingCache[host]=result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MutexSafeWrapper safeMutex(&pingThreadAccessor);
|
MutexSafeWrapper safeMutex(&pingThreadAccessor);
|
||||||
|
Reference in New Issue
Block a user