From: David ‘Bombe’ Roden Date: Wed, 27 Oct 2010 16:34:02 +0000 (+0200) Subject: Always shutdown the logger. X-Git-Tag: 0.1-RC1~12 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=b3189d8d399122275974fe33301e4d0e7704edc3 Always shutdown the logger. --- 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(); + } } //