diff --git a/service/events.go b/service/events.go index 4b8e9c44..1b98ca98 100644 --- a/service/events.go +++ b/service/events.go @@ -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