From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 04:47:27 +0000 (+0200) Subject: Stop the web interface when the plugin is stopped. X-Git-Tag: 0.1-RC1~516 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=88939f20101f34244b998356e64b8cdb05305f33;p=Sone.git Stop the web interface when the plugin is stopped. --- diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 8af45c6..60812cd 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -62,6 +62,9 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 /** The core. */ private Core core; + /** The web interface. */ + private WebInterface webInterface; + /** The l10n helper. */ private PluginL10n l10n; @@ -125,7 +128,7 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 FreenetInterface freenetInterface = new FreenetInterface(pluginRespirator.getNode(), pluginRespirator.getHLSimpleClient()); /* create the web interface. */ - WebInterface webInterface = new WebInterface(this); + webInterface = new WebInterface(this); /* create core. */ core = new Core(); @@ -142,6 +145,9 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 */ @Override public void terminate() { + /* stop the web interface. */ + webInterface.stop(); + /* stop the core. */ core.stop();