[Live-devel] RTSP client freezes under certain conditions
Ross Finlayson
finlayson at live555.com
Wed Mar 22 11:08:28 PST 2006
>'getResponse' function from 'rtspclient.cpp' uses
>'getResponse1' function, which uses 'readSocket'
>function WITHOUT ANY TIMEOUT (NULL is passed for
>timeout). This means that if server dies for whatever
>reason without sending "BYE" to client (or if RTCP is
>disabled), then client will be stuck waiting forever
>for response to any of RTSP commands it issues, like
>"TEARDOWN".
>
>I think there SHOULD be some reasonable timeout in
>'getResponse', something like 10 seconds or so. What
>do you think?
I'm not sure. If the server (or its host) really is dead, then the
TCP connection will die, and "readSocket()" will return with an
error. The situation you're describing occurs if the server still
exists, but (for some reason) not responding.
I suppose adding a timeout might be reasonable, but the real 'bug'
here is that "getResponse()" is using blocking I/O. It should really
be using asynchronous I/O, to better fit the event-driven
architecture of the "LIVE555 Streaming Media" code.
At some point, I'll fix this. In the meantime, though, perhaps I'll
add a 10s timeout...
Ross Finlayson
Live Networks, Inc. (LIVE555.COM)
<http://www.live555.com/>
More information about the live-devel
mailing list