Skip to content

Commit

Permalink
#145: change nbhttp.Engine.Start order, fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
lesismal committed Dec 3, 2021
1 parent db13c52 commit ff075ad
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nbhttp/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,16 @@ func (e *Engine) stopListeners() {

// Start .
func (e *Engine) Start() error {
err := e.startListeners()
err := e.Gopher.Start()
if err != nil {
return err
}

return e.Gopher.Start()
err = e.startListeners()
if err != nil {
e.Gopher.Stop()
return err
}
return err
}

// Stop .
Expand Down

0 comments on commit ff075ad

Please sign in to comment.