<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite">This is an educated guess.</blockquote><div><br></div>Remember, You Have Complete Source Code. Rather than making "an educated guess", you should be able to figure out exactly what's going on.</div><div><br></div><div><br><blockquote type="cite">In Cygwin the RTSPClientConnection<br>socket doesn't close explicitly after a TEAR. The read bitmask<br>in the call to select in BasicTaskScheduler remains active<br>and the call returns immediately by some reason which doesn't<br>apply to other posixes.<br></blockquote><div><br></div>"RTSPServer::RTSPClientSession::handleCmd_TEARDOWN()" deliberately doesn't close the "RTSPServer::RTSPClientConnection" object - on *any* OS. This is because "RTSPClientSession" and "RTSPClientConnection" objects have separate purposes, and can have separate lifetimes. E.g., it's possible, in principle, for a RTSP client to operate on more than one RTSP session (sequentially or concurrently) using the same "RTSPClientConnection" (i.e., the same TCP connection); and it's possible for a RTSP client to use multiple "RTSPClientConnection"s during the lifetime of a RTSP session (e.g., it could create (then close) a new TCP connection for each RTSP command that it sends).</div><div><br></div><div>The "RTSPClientConnection" object gets deleted if the call to "readSocket()" in "RTSPServer::RTSPClientConnection::incomingRequestHandler1()" (line 786 of "RTSPServer.cpp) returns a value < 0 - which should happen when the remote (i.e., client) end of the TCP connection gets closed - i.e., when the RTSP client closes the TCP connection after sending the "TEARDOWN".</div><div><br></div><div>In other words, it's not the "TEARDOWN" command that causes the "RTSPClientConnection" object to get deleted, but rather the client's closing of the TCP connection afterwards that (should be) causing the "RTSPClientConnection" object to get deleted. If, for some reason, that's not happening on your system, then you should try to figure out why.</div><div><br></div><div><br></div><div><blockquote type="cite">Modifying handleCmd_TEARDOWN so that the RTSPClientSession<br></blockquote><blockquote type="cite">deletes itself and its ourClientConnection closes sockets</blockquote><div><br></div>If you insist on doing this, then DON'T modify the supplied code. Instead, subclass "RTSPServer::RTSPClientSession" and reimplement the virtual function "handleCmd_TEARDOWN()".</div><div><br></div><div>If you modify the supplied code, then you can expect no support on this mailing list, and your modifications will be subject to the conditions of the LGPL. This is explained very clearly in the FAQ.</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span>
</div>
<br></body></html>