# How to stop rtsp and http session from server side during its playback?

**URL:** <https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [December 16, 2010, 6:18pm UTC](https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128 "2010-12-16T18:18:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikita\_Sukhin](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nikita\_Sukhin](https://community.wowza.com/u/Nikita_Sukhin)\
**Post date:** [December 16, 2010, 6:18pm UTC](https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128/1 "2010-12-16T18:18:24Z")

</div>

I need to be able to close/interrupt streaming session immediately upon an internal (triggering) event. Currently, I am using session.shutdown() call but onRTSPSessionDestroy()/HTTPSessionDestroy() listener method is called only in about a minute after session.shutdown() call is issued. How can I interrupt/stop the playback immediately from the server side?

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [December 16, 2010, 11:27pm UTC](https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128/2 "2010-12-16T23:27:03Z")

</div>

The client is playing out the cache. I don’t know how you can stop that in non-Flash clients.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [December 17, 2010, 3:57am UTC](https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128/3 "2010-12-17T03:57:36Z")

</div>

I suppose you can do something with these cupertino settings:

[https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming))

But there are going to be segments already sent to the player.

Richard

---

<div class="post-metadata">

**Author:** ![Nikita\_Sukhin](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nikita\_Sukhin](https://community.wowza.com/u/Nikita_Sukhin)\
**Post date:** [December 16, 2010, 10:24pm UTC](https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128/4 "2010-12-16T22:24:54Z")

</div>

Is there a way to limit amount of cache available to the client? Other streaming servers allow certain directives that control cache/no-cache policy. If we are to control playback from the server side, isn’t it somewhat a necessity to control how much stream is played by the client after the stream is terminated? I cam understand a few seconds, but over a minute?

Is there anything in Wowza that allows to have a finer control over this?

Thanks!

-emgvod

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [June 20, 2014, 11:00pm UTC](https://community.wowza.com/t/how-to-stop-rtsp-and-http-session-from-server-side-during-its-playback/35128/5 "2014-06-20T23:00:52Z")

</div>

We are trying to stop the httpsession playback from server side. We are using the IHTTPStreamerCupertinoVODActionNotify2 to watch the chunk loading and the call to httpsession.shutdown() is from public void onFillChunkEnd(IHTTPStreamerCupertinoIndex fileIndex,

IHTTPStreamerCupertinoIndexItem item,

LiveStreamPacketizerCupertinoChunk chunk, boolean audioOnly) {

function.

I m getting the handle of current session in

public void onCreate(IHTTPStreamerCupertinoIndex fileIndex,

IHTTPStreamerApplicationContext appContext,

IHTTPStreamerSession httpStreamerSession, String rawStreamName,

String streamExt, String streamName) {

this.httpSession = httpStreamerSession;

And then i call

this.httpSession.rejectSession();

this.httpSession.shutdown();

inside the onFillChunkEnd

The above call does not end the playback. The IHTTPStreamerCupertinoVODActionNotify2 continue to run.

Thanks
