Skip to content

Commit

Permalink
fix: fix memory leak (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode authored Nov 2, 2022
1 parent 41db9c7 commit e2adc2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ type NodeEvents struct {
}

func (nd *NodeEvents) listenHeadChangesOnce(ctx context.Context) error {
ctx, cancel := context.WithCancel(ctx)
defer cancel()

notifs, err := nd.client.ChainNotify(ctx)
if err != nil {
return err
Expand Down

0 comments on commit e2adc2d

Please sign in to comment.