Skip to content

Commit

Permalink
istanbul: Fix goroutine wg.Add location
Browse files Browse the repository at this point in the history
  • Loading branch information
blukat29 committed Apr 24, 2024
1 parent fd03eaa commit 76fb2e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions consensus/istanbul/core/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func (c *core) Start() error {
// Tests will handle events itself, so we have to make subscribeEvents()
// be able to call in test.
c.subscribeEvents()
c.handlerWg.Add(1)
go c.handleEvents()

return nil
Expand Down Expand Up @@ -81,8 +82,6 @@ func (c *core) handleEvents() {
c.handlerWg.Done()
}()

c.handlerWg.Add(1)

for {
select {
case event, ok := <-c.events.Chan():
Expand Down

0 comments on commit 76fb2e5

Please sign in to comment.