Wowza Community

Disconnecting RTSP publisher

Hello, I have a situation where I need to disconnect a publisher when some condition becomes true. I tried calling

RTPSession.shutdown()

in a plugin and this removes stream from the incoming stream list returned by REST API but the underlying TCP connection remains. Is there any way to close it?

Hi,

You can try using the following code to shut down the underlying I/O session.

BaseIoSession ioSession = rtpSession.getIoSession();
if (ioSession != null)
  ioSession.close();

Michelle