mirror of https://github.com/zlatinb/muwire
postpone connecting to I2P after the main frame has been shown
parent
00886c57ab
commit
1c5adb9b28
|
@ -237,8 +237,7 @@ public class Core {
|
|||
router = new Router(routerProps)
|
||||
router.getContext().setLogManager(new MuWireLogManager())
|
||||
router.runRouter()
|
||||
while(!router.isRunning())
|
||||
Thread.sleep(100)
|
||||
Thread.sleep(5000)
|
||||
}
|
||||
|
||||
log.info("initializing I2P socket manager")
|
||||
|
@ -559,11 +558,11 @@ public class Core {
|
|||
it.init(this)
|
||||
}
|
||||
|
||||
i2pConnector.connect()
|
||||
watchedDirectoryConverter.convert()
|
||||
hasherService.start()
|
||||
trustService.start()
|
||||
trustService.waitForLoad()
|
||||
i2pConnector.connect()
|
||||
contentManager.start()
|
||||
hostCache.start({connectionManager.getConnections().collect{ it.endpoint.destination }} as Supplier)
|
||||
connectionManager.start()
|
||||
|
|
|
@ -108,13 +108,17 @@ class Ready extends AbstractLifecycleHandler {
|
|||
Runtime.getRuntime().addShutdownHook({
|
||||
core.shutdown()
|
||||
})
|
||||
core.startServices()
|
||||
application.context.put("core",core)
|
||||
application.getPropertyChangeListeners("core").each {
|
||||
it.propertyChange(new PropertyChangeEvent(this, "core", null, core))
|
||||
}
|
||||
|
||||
core.eventBus.publish(new UILoadedEvent())
|
||||
|
||||
def initer = {core.startServices()} as Runnable
|
||||
initer = new Thread(initer, "core initializer")
|
||||
initer.setDaemon(true)
|
||||
initer.start()
|
||||
} catch (Exception bad) {
|
||||
log.log(Level.SEVERE,"couldn't initialize core",bad)
|
||||
|
||||
|
|
Loading…
Reference in New Issue