mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 21:51:17 +02:00
- commented out ping thread as it was unused and possibly caused crashing
This commit is contained in:
@@ -703,13 +703,14 @@ Socket::Socket()
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Socket::getThreadedPingMS(std::string host) {
|
float Socket::getThreadedPingMS(std::string host) {
|
||||||
|
float result = -1;
|
||||||
|
/*
|
||||||
if(pingThread == NULL) {
|
if(pingThread == NULL) {
|
||||||
lastThreadedPing = 0;
|
lastThreadedPing = 0;
|
||||||
pingThread = new SimpleTaskThread(this,0,50);
|
pingThread = new SimpleTaskThread(this,0,50);
|
||||||
pingThread->start();
|
pingThread->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
float result = -1;
|
|
||||||
if(pingCache.find(host) == pingCache.end()) {
|
if(pingCache.find(host) == pingCache.end()) {
|
||||||
MutexSafeWrapper safeMutex(&pingThreadAccessor);
|
MutexSafeWrapper safeMutex(&pingThreadAccessor);
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
@@ -721,6 +722,7 @@ float Socket::getThreadedPingMS(std::string host) {
|
|||||||
result = pingCache[host];
|
result = pingCache[host];
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,7 +752,6 @@ Socket::~Socket()
|
|||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END closing socket = %d...\n",__FILE__,__FUNCTION__,sock);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END closing socket = %d...\n",__FILE__,__FUNCTION__,sock);
|
||||||
|
|
||||||
BaseThread::shutdownAndWait(pingThread);
|
|
||||||
delete pingThread;
|
delete pingThread;
|
||||||
pingThread = NULL;
|
pingThread = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user