[NOD-1247] Add check for routerInitializer presence (#864)

Co-authored-by: Yaroslav Reshetnyk <yaroslav.r@it-dimension.com>
This commit is contained in:
oudeis 2020-08-13 12:04:43 +03:00 committed by GitHub
parent 23a3594c18
commit 32463ce906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,10 @@ func NewNetAdapter(cfg *config.Config) (*NetAdapter, error) {
// Start begins the operation of the NetAdapter
func (na *NetAdapter) Start() error {
if na.routerInitializer == nil {
return errors.New("routerInitializer was not set")
}
err := na.server.Start()
if err != nil {
return err