<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><base href="x-msg://2993/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><p class="MsoNormal" style="margin: 0in 0in 10pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 17px; ">Lately I've seen some random exceptions when streams are being shut down. I believe these were introduced when I changed the code so it waits for a TEARDOWN response. This was btw done as Cisco mentioned their server requires that.</p></div></div></blockquote>BTW, that doesn't really make much sense, because after the server receives a "TEARDOWN" request, it has no further communication from that client - other than the client closing the connection. But the server needs to be prepared for the client closing the connection at any time anyway. So the server really shouldn't care whether or not the client waits for a response to the "TEARDOWN". But anyway:</div><div><br><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><p class="MsoNormal" style="margin: 0in 0in 10pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 17px; "><o:p></o:p></p><p class="MsoNormal" style="margin: 0in 0in 10pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 17px; ">I'm probably doing something wrong, as it appears the error happens in, or are related to, the TEARDOWN response handler.<o:p></o:p></p><p class="MsoNormal" style="margin: 0in 0in 10pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 17px; ">With the shutdownStream() function in testRTSPClient as a model I basically added a response handler to the sendTeardownCommand() and added an additional cleanup function that should take care of the final cleanup and properly close the rtspClient.<o:p></o:p></p><p class="MsoNormal" style="margin: 0in 0in 10pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 17px; "><b>- Can't I assume the rtspClient is valid after TEARDOWN?</b></p></div></div></blockquote><div>Yes, the "RTSPClient" object remains valid until you call "Medium::close()" on it. So therefore, make sure that you don't call "Medium::close()" until *after* you've received the response to the "TEARDOWN". (Note that the "testRTSPClient" code calls "Medium::close()" on "rtspClient" immediately after sending the "TEARDOWN" command, so obviously you'll need to change that in your code.)</div></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>