refactor: move port check after identity init
This commit is contained in:
parent
1e3addac8b
commit
4819bf45ac
|
@ -74,12 +74,6 @@ func (p *PortalImpl) getInitFuncs() []func() error {
|
|||
return []func() error{
|
||||
func() error {
|
||||
return config.Init(p.Logger())
|
||||
}, func() error {
|
||||
if !p.Config().IsSet("core.port") {
|
||||
p.logger.Fatal("core.port is required")
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
func() error {
|
||||
var seed [32]byte
|
||||
|
@ -103,6 +97,13 @@ func (p *PortalImpl) getInitFuncs() []func() error {
|
|||
|
||||
return nil
|
||||
},
|
||||
func() error {
|
||||
if !p.Config().IsSet("core.port") {
|
||||
p.logger.Fatal("core.port is required")
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
func() error {
|
||||
return protocols.Init(p.protocolRegistry)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue