forked from I2P_Developers/i2p.i2p
- Only stop a plugin at shutdown if it was running
This commit is contained in:
@ -4,7 +4,7 @@ import net.i2p.router.RouterContext;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
* Stop all plugins that are installed
|
||||
* Stop all plugins that are installed and running
|
||||
*
|
||||
* @since 0.7.13
|
||||
* @author zzz
|
||||
@ -21,14 +21,14 @@ public class PluginStopper extends PluginStarter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop all plugins
|
||||
* (whether or not they were ever started)
|
||||
* Stop all running plugins
|
||||
*
|
||||
* this shouldn't throw anything
|
||||
*/
|
||||
static void stopPlugins(RouterContext ctx) {
|
||||
private static void stopPlugins(RouterContext ctx) {
|
||||
Log log = ctx.logManager().getLog(PluginStopper.class);
|
||||
for (String app : getPlugins()) {
|
||||
if (isPluginRunning(app, ctx)) {
|
||||
try {
|
||||
stopPlugin(ctx, app);
|
||||
} catch (Throwable e) {
|
||||
@ -38,3 +38,4 @@ public class PluginStopper extends PluginStarter {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user