Skip to content

Commit

Permalink
Mark pending events as processed in all branches
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed Mar 21, 2024
1 parent 6cb83df commit aca5bfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockchain/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ func (c *Client) RegisterEventsListener(begin types.BlockNumber, callback Events
cancelled := false

go func() {
defer pendingEvents.Do(callback)

<-subscriptionStarted

if begin >= types.BlockNumber(subscriptionStartBlock) {
Expand Down Expand Up @@ -197,8 +199,6 @@ func (c *Client) RegisterEventsListener(begin types.BlockNumber, callback Events
}
}
}

pendingEvents.Do(callback)
}()

once := sync.Once{}
Expand Down

0 comments on commit aca5bfb

Please sign in to comment.