Skip to content

Commit

Permalink
Fix defer not unhooking the events
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsporn committed Nov 24, 2023
1 parent 2976961 commit 4c1d922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/blockhandler/blockhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (i *BlockHandler) SubmitBlockAndAwaitEvent(ctx context.Context, block *mode
}
}, event.WithWorkerPool(i.workerPool)).Unhook

defer lo.Batch(evtUnhook, prefilteredUnhook)
defer lo.Batch(evtUnhook, prefilteredUnhook)()

if err := i.submitBlock(block); err != nil {
return ierrors.Wrapf(err, "failed to issue block %s", blockID)
Expand Down

0 comments on commit 4c1d922

Please sign in to comment.