# Available event on connection timeout for RTSP session?

**URL:** <https://community.wowza.com/t/available-event-on-connection-timeout-for-rtsp-session/44050>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [September 29, 2014, 3:50pm UTC](https://community.wowza.com/t/available-event-on-connection-timeout-for-rtsp-session/44050 "2014-09-29T15:50:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christofer\_Eliasson](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@Christofer\_Eliasson](https://community.wowza.com/u/Christofer_Eliasson)\
**Post date:** [September 29, 2014, 3:50pm UTC](https://community.wowza.com/t/available-event-on-connection-timeout-for-rtsp-session/44050/1 "2014-09-29T15:50:07Z")

</div>

I use Wowza GoCoder to publish video to a custom Wowza live application. In my application I attach an IRTSPActionNotify event listener within the onRTPSessionCreate callback. In the onRecord callback of my IRTSPActionNotify I perform various tasks - start recording the live stream, among other things. In my onTeardown callback I then stop the recording and do some additional processing of the recorded video, like moving the video file to a different storage location.

What I just noticed was that if the encoder timeout, due to a lost connection, power failure or some other sudden event, I wont receive an onTeardown event - not even when the RTSP session timeout. This is a big issue for me, since I need to do this additional processing before I make the published stream available for on demand view through another application.

Is there some reliable event, or other reliable way to know that a connection has timed out, so that I can trigger this processing also for streams that doesn’t fire a teardown-event?

_I first discovered this issue when I lost connection on my mobile device while encoding video using the Wowza GoCoder app for iOS, but I guess the issue would be the same for any encoder._

---

<div class="post-metadata">

**Author:** ![Shoo\_Kyuk\_Wei](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@Shoo\_Kyuk\_Wei](https://community.wowza.com/u/Shoo_Kyuk_Wei)\
**Post date:** [October 8, 2014, 5:11pm UTC](https://community.wowza.com/t/available-event-on-connection-timeout-for-rtsp-session/44050/2 "2014-10-08T17:11:34Z")

</div>

Hi, not sure about this, but i think here’s what you may want:

[http://vlcdoc.com/serverapi/com/wowza/wms/module/IModuleOnRTPSession.html](http://vlcdoc.com/serverapi/com/wowza/wms/module/IModuleOnRTPSession.html)
