From b3189d8d399122275974fe33301e4d0e7704edc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 27 Oct 2010 18:34:02 +0200 Subject: [PATCH] Always shutdown the logger. --- .../net/pterodactylus/sone/main/SonePlugin.java | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 810fef1..50f17a1 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -167,21 +167,24 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 */ @Override public void terminate() { - /* stop the web interface. */ - webInterface.stop(); + try { + /* stop the web interface. */ + webInterface.stop(); - /* stop the core. */ - core.stop(); + /* stop the core. */ + core.stop(); - /* TODO wait for core to stop? */ - try { - pluginRespirator.putStore(pluginStore); - } catch (DatabaseDisabledException dde1) { - logger.log(Level.WARNING, "Could not store plugin store, database is disabled.", dde1); - } + /* TODO wait for core to stop? */ + try { + pluginRespirator.putStore(pluginStore); + } catch (DatabaseDisabledException dde1) { + logger.log(Level.WARNING, "Could not store plugin store, database is disabled.", dde1); + } - /* shutdown logger. */ - Logging.shutdown(); + } finally { + /* shutdown logger. */ + Logging.shutdown(); + } } // -- 2.7.4