Stop Sone rescuers when stopping core.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Dec 2014 19:35:41 +0000 (20:35 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Dec 2014 19:35:41 +0000 (20:35 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 17905f3..1153c0f 100644 (file)
@@ -1410,6 +1410,11 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                                saveSone(soneInserter.getKey());
                        }
                }
+               synchronized (soneRescuers) {
+                       for (SoneRescuer soneRescuer : soneRescuers.values()) {
+                               soneRescuer.stop();
+                       }
+               }
                saveConfiguration();
                database.stop();
                webOfTrustUpdater.stop();