Set firstStart and newConfig only after the web interface has started.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 12 Dec 2010 13:58:49 +0000 (14:58 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 12 Dec 2010 13:58:49 +0000 (14:58 +0100)
src/main/java/net/pterodactylus/sone/main/SonePlugin.java

index a24802b..5a0e8ae 100644 (file)
@@ -184,8 +184,6 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
 
                /* create the web interface. */
                webInterface = new WebInterface(this);
-               webInterface.setFirstStart(firstStart);
-               webInterface.setNewConfig(newConfig);
                core.addCoreListener(webInterface);
 
                /* create the identity manager. */
@@ -200,6 +198,8 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10
                                core.setConfiguration(newConfiguration);
                        }
                        webInterface.start();
+                       webInterface.setFirstStart(firstStart);
+                       webInterface.setNewConfig(newConfig);
                        identityManager.start();
                        startupFailed = false;
                } finally {