[Live-devel] RTSP connection loss
Andrew Voznytsa
andrew.voznytsa at gmail.com
Sat Jan 27 06:15:28 PST 2007
Hello all,
simple problem - if TCP connection is lost I'm getting 100% CPU usage
(Win32 and company).
Problem is in liveMedia/RTSPClient.cpp:
void RTSPClient::incomingRequestHandler1() {
...
bytesRead = getResponse1(readBuf, fResponseBufferSize);
if (bytesRead == 0) {
envir().setResultErrMsg("Failed to read response: ");
return;
}
...
}
if getResponse1() returns 0 (because of connection loss)
incomingRequestHandler1() simply returns. Since scheduler has nothing
else to do it will reschedule incomingRequestHandler1() again and again
thus raising CPU usage to 100%.
I simply insert Sleep(1) before 'return' operator (Win32 sys call) to
temporary solve problem.
Does anyone have better solution which could be applied to official
source tree?
--
Best regards,
Andrew Voznytsa
More information about the live-devel
mailing list