mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-23 03:11:35 +00:00
move router member initialization into router.init
This commit is contained in:
parent
9835c63818
commit
ebd806f27a
@ -73,9 +73,6 @@ func (c *Core) init() error {
|
|||||||
c.log.Warnln("SigningPublicKey in config is incorrect, should be", sp)
|
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.peers.init(c)
|
||||||
c.router.init(c)
|
c.router.init(c)
|
||||||
c.switchTable.init(c) // TODO move before peers? before router?
|
c.switchTable.init(c) // TODO move before peers? before router?
|
||||||
|
@ -73,6 +73,9 @@ func (r *router) init(core *Core) {
|
|||||||
r.core.config.Mutex.RLock()
|
r.core.config.Mutex.RLock()
|
||||||
r.nodeinfo.setNodeInfo(r.core.config.Current.NodeInfo, r.core.config.Current.NodeInfoPrivacy)
|
r.nodeinfo.setNodeInfo(r.core.config.Current.NodeInfo, r.core.config.Current.NodeInfoPrivacy)
|
||||||
r.core.config.Mutex.RUnlock()
|
r.core.config.Mutex.RUnlock()
|
||||||
|
r.dht.init(r.core)
|
||||||
|
r.searches.init(r.core)
|
||||||
|
r.sessions.init(r.core)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Starts the mainLoop goroutine.
|
// Starts the mainLoop goroutine.
|
||||||
|
Loading…
Reference in New Issue
Block a user