Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appShutdown not triggered #36

Closed
juanp123 opened this issue Nov 29, 2014 · 1 comment
Closed

appShutdown not triggered #36

juanp123 opened this issue Nov 29, 2014 · 1 comment
Assignees

Comments

@juanp123
Copy link

Issue was found using the nightly build of 1.0.4 (as of this date) from https://builds.apache.org/job/Red5-server/changes. It may affect versions since 1.0.1 (noted at the end).

When using the red5-shutdown.bat script on windows 7, the appStop() is not being triggered.

Basic code example is as follows:

public class myApplicationTest extends org.red5.server.adapter.MultiThreadedApplicationAdapter     
{

    @Override public boolean appStart(IScope app) {
        System.out.println("App started." );  // <== WORKS FINE
        if (super.appStart(app) == false) {
             return false;
        }
         return true;
     }

    @Override public void appStop(IScope app) {
        System.out.println("Shut down started" );  // <== NEVER CALLED
        super.appStop(app);
    }
}

I believe this is an issue in 1.0.1 (and perhaps since) as well. The application logs shutdown events, and looking back to when it was in 1.0.1, I do not see any shutdown event in those logs.

*** On a related side note the reason I found this bug is that I need stream recordings to be nicely closed when Red5 is shutdown (i.e. the .ser copied to a .flv). Assuming appStop() is triggered as it should be, will Red5 automatically close all open recordings or does that need to be done manually? I would like to confirm what default behavior should/will be.

@mondain mondain self-assigned this Dec 4, 2014
@mondain
Copy link
Member

mondain commented Dec 4, 2014

This should be resolved on the latest commit; if you are not on HEAD, you can work around this issue by adding the destroy-method attribute and specifying its value as "unregister" to your WebScope bean in your applications red5-web.xml file. Lastly, here is a related wiki entry https://github.com/Red5/red5-server/wiki/Log-Messages

@mondain mondain closed this as completed Dec 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants