4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-03 09:37:47 +00:00

Don't crash if Yggdrasil is started with no router adapter

This commit is contained in:
Neil Alexander
2019-03-29 08:38:09 +00:00
parent dd05a7f2a8
commit a830521078
3 changed files with 14 additions and 8 deletions

View File

@ -128,7 +128,9 @@ func (r *router) init(core *Core) {
r.nodeinfo.setNodeInfo(r.core.config.Current.NodeInfo, r.core.config.Current.NodeInfoPrivacy)
r.core.config.Mutex.RUnlock()
r.cryptokey.init(r.core)
r.adapter.Init(&r.core.config, r.core.log, send, recv, reject)
if r.adapter != nil {
r.adapter.Init(&r.core.config, r.core.log, send, recv, reject)
}
}
// Starts the mainLoop goroutine.