Fix rescue mode.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 10 Jul 2013 06:00:09 +0000 (08:00 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 10 Jul 2013 06:00:09 +0000 (08:00 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 7b4bc4b..5018b25 100644 (file)
@@ -1052,6 +1052,14 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                        synchronized (sones) {
                                sone.setOptions(storedSone.get().getOptions());
                                sone.setKnown(storedSone.get().isKnown());
+                               sone.setStatus((sone.getTime() == 0) ? SoneStatus.unknown : SoneStatus.idle);
+                               if (sone.isLocal()) {
+                                       soneInserters.remove(storedSone.get()).stop();
+                                       SoneInserter soneInserter = new SoneInserter(this, eventBus, freenetInterface, sone);
+                                       soneInserters.put(sone, soneInserter);
+                                       soneInserter.start();
+                                       touchConfiguration();
+                               }
                                sones.put(sone.getId(), sone);
                        }
                }