On Wed, Feb 17, 2010 at 7:57 AM, Sébastien Escudier <span dir="ltr"><<a href="mailto:sebastien-devel@celeos.eu">sebastien-devel@celeos.eu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> If you can track this down some more, please let us know.<br>
<br>
</div>Ok, so the client is blocked in RTSPClient.cpp -> getResponse1 line 2191 in a<br>
readsocket call.<br>
<br>
The comment in the file says :<br>
// Keep reading data from the socket until we see "\r\n\r\n" (except<br>
// at the start), or until we fill up our buffer.<br>
// Don't read any more than this.<br>
<br>
and at this point the buffer (what has been read in the socket) is [1] (404 not<br>
found, ending with \r\n)<br>
So obviously, it won't go any further, because the server won't send anything<br>
more, and live555 client is waiting for another \r\n<br>
<br>
This happens in some rare cases, and most of the time, the same answer (404 not<br>
found with no \r\n\r\n at the end) is correctly received and handled by my<br>
live555 client.<br>
<br>
Do you have any idea what is wrong in this case ?<br></blockquote><div><br>I reported the same issue a week or three back; I fixed it the same way you did by adding timeouts to the various readSocket() calls in the RTSPClient implementation. Purportedly this code is undergoing a rewrite, so Ross didn't merge my changes (which is fine by me). <br>
<br>I'm not sure how to reproduce the issue 100% of the time, but I know I occasionally see a hang in these select() statements, and it's generally when the RTSP server or internet connection hangs. The timeout resolves the problem.<br>
</div></div><br>