Store whether the core has been stopped.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 67c16a6..1bf6647 100644 (file)
@@ -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<Sone, SoneStatus> soneStatuses = new HashMap<Sone, SoneStatus>();
@@ -1140,6 +1143,7 @@ public class Core implements IdentityListener {
                        }
                }
                saveConfiguration();
+               stopped = true;
        }
 
        //