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 = new Router(routerProps)
|
||||||
router.getContext().setLogManager(new MuWireLogManager())
|
router.getContext().setLogManager(new MuWireLogManager())
|
||||||
router.runRouter()
|
router.runRouter()
|
||||||
while(!router.isRunning())
|
Thread.sleep(5000)
|
||||||
Thread.sleep(100)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("initializing I2P socket manager")
|
log.info("initializing I2P socket manager")
|
||||||
|
@ -559,11 +558,11 @@ public class Core {
|
||||||
it.init(this)
|
it.init(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
i2pConnector.connect()
|
|
||||||
watchedDirectoryConverter.convert()
|
watchedDirectoryConverter.convert()
|
||||||
hasherService.start()
|
hasherService.start()
|
||||||
trustService.start()
|
trustService.start()
|
||||||
trustService.waitForLoad()
|
trustService.waitForLoad()
|
||||||
|
i2pConnector.connect()
|
||||||
contentManager.start()
|
contentManager.start()
|
||||||
hostCache.start({connectionManager.getConnections().collect{ it.endpoint.destination }} as Supplier)
|
hostCache.start({connectionManager.getConnections().collect{ it.endpoint.destination }} as Supplier)
|
||||||
connectionManager.start()
|
connectionManager.start()
|
||||||
|
|
|
@ -108,13 +108,17 @@ class Ready extends AbstractLifecycleHandler {
|
||||||
Runtime.getRuntime().addShutdownHook({
|
Runtime.getRuntime().addShutdownHook({
|
||||||
core.shutdown()
|
core.shutdown()
|
||||||
})
|
})
|
||||||
core.startServices()
|
|
||||||
application.context.put("core",core)
|
application.context.put("core",core)
|
||||||
application.getPropertyChangeListeners("core").each {
|
application.getPropertyChangeListeners("core").each {
|
||||||
it.propertyChange(new PropertyChangeEvent(this, "core", null, core))
|
it.propertyChange(new PropertyChangeEvent(this, "core", null, core))
|
||||||
}
|
}
|
||||||
|
|
||||||
core.eventBus.publish(new UILoadedEvent())
|
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) {
|
} catch (Exception bad) {
|
||||||
log.log(Level.SEVERE,"couldn't initialize core",bad)
|
log.log(Level.SEVERE,"couldn't initialize core",bad)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue