diff --git a/src/yggdrasil/core.go b/src/yggdrasil/core.go index 870597a9..fb2142c0 100644 --- a/src/yggdrasil/core.go +++ b/src/yggdrasil/core.go @@ -73,9 +73,6 @@ func (c *Core) init() error { c.log.Warnln("SigningPublicKey in config is incorrect, should be", sp) } - c.router.searches.init(c) - c.router.dht.init(c) - c.router.sessions.init(c) c.peers.init(c) c.router.init(c) c.switchTable.init(c) // TODO move before peers? before router? diff --git a/src/yggdrasil/router.go b/src/yggdrasil/router.go index ed919983..29bdf1d4 100644 --- a/src/yggdrasil/router.go +++ b/src/yggdrasil/router.go @@ -73,6 +73,9 @@ func (r *router) init(core *Core) { r.core.config.Mutex.RLock() r.nodeinfo.setNodeInfo(r.core.config.Current.NodeInfo, r.core.config.Current.NodeInfoPrivacy) r.core.config.Mutex.RUnlock() + r.dht.init(r.core) + r.searches.init(r.core) + r.sessions.init(r.core) } // Starts the mainLoop goroutine.