I am troubleshooting an issue similar to Dirk Dugger when receiving RTP over TCP via the RTSPClient class.  If the server closes the connection mid stream, the client gets no notification.<div><br></div><div>I have traced the problem to the readSocket() function in GroupsockHelper.cpp where recvfrom() is used to get data from the socket.  On posix systems, recvfrom() should return the number of bytes read, or a negative number on error, or **zero if the connection is TCP and the peer has closed its half side of the connection**.  It's this last check for zero that is missing, causing Live555 to continue checking the socket for new data even though it has been closed by the server.</div>
<div><br></div><div>This problem can manifest both with RTP over TCP as well as the RTSP commands. If the server (or intermediary firewall) closes the socket without sending a RTSP response for example, the library will wait indefinitely for a response that never comes.</div>
<div><br></div><div>Is there a simple way to add the check for zero for recvfrom() and bubble the message up through the library so that RTSPClients can be notified?</div>