diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index cb1fdb80e..937483cad 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -696,9 +696,9 @@ float Socket::getThreadedPingMS(std::string host) { float result = -1; if(pingCache.find(host) == pingCache.end()) { MutexSafeWrapper safeMutex(&pingThreadAccessor); - pingCache[host]=-1; safeMutex.ReleaseLock(); result = getAveragePingMS(host, 1); + pingCache[host]=result; } else { MutexSafeWrapper safeMutex(&pingThreadAccessor);