From: David ‘Bombe’ Roden Date: Wed, 17 Nov 2010 12:42:49 +0000 (+0100) Subject: Store whether the core has been stopped. X-Git-Tag: 0.3-RC1~34 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b9556a5c45d39a82f8f4f94a983ef581d487b50f;p=Sone.git Store whether the core has been stopped. This is used to stop a thread that tries to rescue a Sone. --- 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; } //