Skip to content

Commit

Permalink
handle context cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaubennassar committed Nov 12, 2024
1 parent f2d99e1 commit 44593c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sync/evmdownloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (d *EVMDownloaderImplementation) WaitForNewBlocks(
case <-ticker.C:
header, err := d.ethClient.HeaderByNumber(ctx, d.blockFinality)
if err != nil {
if errors.Is(err, context.Canceled) {
if ctx.Err() == nil {
attempts++
d.log.Error("error getting last block num from eth client: ", err)
d.rh.Handle("waitForNewBlocks", attempts)
Expand Down

0 comments on commit 44593c9

Please sign in to comment.