Rtppollthread.cpp void RTPPollThread::Stop() { if (!IsRunning()) return; stopmutex.Lock(); stop = true; stopmutex.Unlock(); if (transmitter) transmitter->AbortWait(); RTPTime thetime = RTPTime::CurrentTime(); bool done = false; while (JThread::IsRunning() && !done) { // wait max 5 sec RTPTime curtime = RTPTime::CurrentTime(); if ((curtime.GetDouble()-thetime.GetDouble()) > 5.0) done = true; RTPTime::Wait(RTPTime(0,10000)); } if (JThread::IsRunning()) { #ifndef _WIN32_WCE // std::cerr << "RTPPollThread: Warning! Having to kill thread!" << std::endl; LOGE("RTPPollThread: Warning! Having to kill thread!"); #endif // _WIN32_WCE JThread::Kill(); } stop = false; transmitter = 0; }