I noticed something that may be a problem for us which I think is related to a stream not being completely removed.
Here's the scenario:
1. I have a channel with a stream created by the Stream class by using Stream.createInstance(thisAppInstance,"Stream1");
2. This stream is being read by our CDN to be served to viewers.
So far so good.
What I've noticed is that after I supposedly destroyed that channel and try to create it again the following call didn't return null:
IMediaStream mainStream = thisAppInstance.getStreams().getStream("Stream1");
if (mainStream==null) returned false.
Since on server startup I do get back null I'm assuming it is not being destroyed properly.
What I attempt to do in order to destroy is the following:
IMediaStream activePublisherStream = thisAppInstance.getStreams().getStream("Stream1");
My question is, what is the correct way for destorying the stream.