From b9556a5c45d39a82f8f4f94a983ef581d487b50f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 17 Nov 2010 13:42:49 +0100 Subject: [PATCH] Store whether the core has been stopped. This is used to stop a thread that tries to rescue a Sone. --- src/main/java/net/pterodactylus/sone/core/Core.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 67c16a6..1bf6647 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -95,6 +95,9 @@ public class Core implements IdentityListener { /** The Sone downloader. */ private final SoneDownloader soneDownloader; + /** Whether the core has been stopped. */ + private volatile boolean stopped; + /** The Sones’ statuses. */ /* synchronize access on itself. */ private final Map soneStatuses = new HashMap(); @@ -1140,6 +1143,7 @@ public class Core implements IdentityListener { } } saveConfiguration(); + stopped = true; } // -- 2.7.4