From 0f98cbe9e9819a942b179c85d354c9a6cfe8a8c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 23 Sep 2011 21:04:13 +0200 Subject: [PATCH] Stop web of trust connector when plugin stops. --- src/main/java/net/pterodactylus/sone/main/SonePlugin.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index d642dd8..d04c547 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -103,6 +103,9 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr /** The l10n helper. */ private PluginL10n l10n; + /** The web of trust connector. */ + private WebOfTrustConnector webOfTrustConnector; + /** The identity manager. */ private IdentityManager identityManager; @@ -181,7 +184,7 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr /* create web of trust connector. */ PluginConnector pluginConnector = new PluginConnector(pluginRespirator); - WebOfTrustConnector webOfTrustConnector = new WebOfTrustConnector(pluginConnector); + webOfTrustConnector = new WebOfTrustConnector(pluginConnector); identityManager = new IdentityManager(webOfTrustConnector); identityManager.setContext("Sone"); @@ -236,6 +239,9 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr /* stop the identity manager. */ identityManager.stop(); + + /* stop the web of trust connector. */ + webOfTrustConnector.stop(); } catch (Throwable t1) { logger.log(Level.SEVERE, "Error while shutting down!", t1); } finally { -- 2.7.4