From 66bca5a36ca26d606867baf4c8d7364264cc4934 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 12 Sep 2012 07:48:43 +0200 Subject: [PATCH] Save Sones and configuration on stopping. --- src/main/java/net/pterodactylus/sone/core/Core.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.7.4