Skip to content

Commit

Permalink
cancel contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
iansuvak committed Oct 15, 2024
1 parent f1853d5 commit 67c8dda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion relayer/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ func main() {
logger.Fatal("Failed to create proposer height cache", zap.Error(err))
panic(err)
}
proposerHeightCache.Start(context.Background())

proposerHeightCacheCtx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
proposerHeightCache.Start(proposerHeightCacheCtx)

signatureAggregator, err := aggregator.NewSignatureAggregator(
network,
Expand Down
4 changes: 3 additions & 1 deletion signature-aggregator/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ func main() {
logger.Fatal("Failed to create proposer height cache", zap.Error(err))
panic(err)
}
proposerHeightCache.Start(context.Background())
ctx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
proposerHeightCache.Start(ctx)

signatureAggregator, err := aggregator.NewSignatureAggregator(
network,
Expand Down

0 comments on commit 67c8dda

Please sign in to comment.