Don’t register shutdown hooks for all Services.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneDownloader.java
index 07a3755..9b48d7d 100644 (file)
@@ -69,7 +69,7 @@ public class SoneDownloader extends AbstractService {
         *            The Freenet interface
         */
        public SoneDownloader(Core core, FreenetInterface freenetInterface) {
-               super("Sone Downloader");
+               super("Sone Downloader", false);
                this.core = core;
                this.freenetInterface = freenetInterface;
        }
@@ -125,7 +125,7 @@ public class SoneDownloader extends AbstractService {
                                core.addSone(parsedSone);
                        }
                } finally {
-                       core.setSoneStatus(sone, SoneStatus.idle);
+                       core.setSoneStatus(sone, (sone.getTime() == 0) ? SoneStatus.unknown : SoneStatus.idle);
                }
        }