From: David ‘Bombe’ Roden Date: Wed, 12 Sep 2012 05:48:43 +0000 (+0200) Subject: Save Sones and configuration on stopping. X-Git-Tag: 0.8.3^2~39^2~1 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=66bca5a36ca26d606867baf4c8d7364264cc4934;p=Sone.git Save Sones and configuration on stopping. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 14e9f89..0ce144a 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1966,11 +1966,13 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis @Override public void serviceStop() { synchronized (localSones) { - for (SoneInserter soneInserter : soneInserters.values()) { - soneInserter.removeSoneInsertListener(this); - soneInserter.stop(); + for (Entry soneInserter : soneInserters.entrySet()) { + soneInserter.getValue().removeSoneInsertListener(this); + soneInserter.getValue().stop(); + saveSone(soneInserter.getKey()); } } + saveConfiguration(); webOfTrustUpdater.stop(); updateChecker.stop(); updateChecker.removeUpdateListener(this);