Skip to main content
Known Participant
June 18, 2010
Question

Stopping stream at FMLE but stream name still showing in FMS admin console

  • June 18, 2010
  • 2 replies
  • 771 views

This causes a "NetStream.Publish.BadName" error if I restart FMLE because the stream name is already in use.

Other details:

I'm publishing server to server via FMS 3.5 docs:

http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ffb.html

I get this error at the first FMS box.

I've tried the following in application.onUnpublish:

    nc.close();
    nc = null;
    ns = null;

Nothing makes my stream disappear from the admin console though.

Any suggestions?

Thanks

    This topic has been closed for replies.

    2 replies

    June 20, 2010

    Hi,

    Another thing you could try is,

    on server-side in application.onPublish( ) you are calling nc.close( ) //I assume this nc is the one being to used to connect to the 2nd FMS box or app.

    So when nc.close( ) is called in the 1st app, it would invoke application.onDisconnect() handler if defined on 2nd app. On reaching application.onDisconnect( ) you could call application.shutdown( ) which unloads the app completely (which you can check on admin console). With this along with the app the stream will also be removed.

    Regards

    Mamata

    Known Participant
    June 21, 2010

    Thanks for the responses.  They're very helpful.

    Hmmm...  Shutting down the application.  I'll try it, but it seems that might mean the end of my live program, which is what I'm trying to avoid.

    What I'm trying to code is stream recovery when there is a temporary disconnect or NetConnection.Connect.Closed, as can happen from time to time.  I want my program to automatically recover in this instance and pick up displaying the live stream again.

    This is an easy thing to do from my video player to FMS - simply detect a NetConnection.Connect.Closed message and attempt reconnection at 1 second intervals until connection is reestablished. Works very well.

    This is much tougher between two FMS boxes though for the reason stated above.

    I'll try your suggestion and report results.

    Back soon.

    Thanks

    calmchessplayer
    Inspiring
    June 19, 2010

    well you definatly have a problem the stream name will not be cleaned up untill the next time the garbage collector runs which could be anywhere from now untill never just to be funny ...........you should append your stream name with ......new Date.valueOf.......this way you get a unique streamname everytime......I don't know if this is possible for you though since you use FMLE does the stream name get set on the server side application? I think it does if I remember correctly.