mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-30 13:35:19 +00:00
check if an error was returned by Core._init and return it if so
This commit is contained in:
parent
05c6006f51
commit
7a314afb31
@ -12,9 +12,9 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/cheggaaa/pb/v3"
|
||||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||||
"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
||||||
"github.com/cheggaaa/pb/v3"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var numHosts = flag.Int("hosts", 1, "number of host vars to generate")
|
var numHosts = flag.Int("hosts", 1, "number of host vars to generate")
|
||||||
|
@ -160,7 +160,10 @@ func (c *Core) _start(nc *config.NodeConfig, log *log.Logger) (*config.NodeState
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.log.Infoln("Starting up...")
|
c.log.Infoln("Starting up...")
|
||||||
c._init()
|
if err := c._init(); err != nil {
|
||||||
|
c.log.Errorln("Failed to initialize core")
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
if err := c.link.init(c); err != nil {
|
if err := c.link.init(c); err != nil {
|
||||||
c.log.Errorln("Failed to start link interfaces")
|
c.log.Errorln("Failed to start link interfaces")
|
||||||
|
Loading…
Reference in New Issue
Block a user