From 77049a2db63b9a21e8ce3df08ff9893895730b4d Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 4 Jun 2010 20:37:42 +0000 Subject: [PATCH] updated ping logic --- source/shared_lib/sources/platform/posix/socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 1f287b3f9..cb1fdb80e 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -688,6 +688,7 @@ Socket::Socket() float Socket::getThreadedPingMS(std::string host) { if(pingThread == NULL) { + lastThreadedPing = 0; pingThread = new SimpleTaskThread(this,0,50); pingThread->start(); } @@ -1753,7 +1754,7 @@ void BroadCastSocketThread::execute() { float Socket::getAveragePingMS(std::string host, int pingCount) { double result = -1; - const bool debugPingOutput = true; + const bool debugPingOutput = false; char szCmd[1024]=""; #ifdef WIN32 sprintf(szCmd,"ping -n %d %s",pingCount,host.c_str());