Don't grab the ClientApp if we don't need to

This commit is contained in:
str4d
2014-07-19 23:55:43 +00:00
parent a2567b0ee2
commit 3a899d52d1

View File

@ -671,9 +671,9 @@ public class PluginStarter implements Runnable {
for(ClientAppConfig app : apps) {
// If the client is a running ClientApp that we want to stop,
// bypass all the logic below.
ClientApp ca = ctx.routerAppManager().getClientApp(app.className, LoadClientAppsJob.parseArgs(app.args));
if (ca != null && ca.getState() == ClientAppState.RUNNING) {
if (action.equals("stop")) {
if (action.equals("stop")) {
ClientApp ca = ctx.routerAppManager().getClientApp(app.className, LoadClientAppsJob.parseArgs(app.args));
if (ca != null && ca.getState() == ClientAppState.RUNNING) {
try {
ca.shutdown(LoadClientAppsJob.parseArgs(app.stopargs));
} catch (Throwable t) {