Skip to content

Commit c5f010d

Browse files
committed
Fixup
1 parent 2359ac9 commit c5f010d

File tree

7 files changed

+610
-466
lines changed

7 files changed

+610
-466
lines changed

sentinel/chain_poller/chain_poller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ func (cp *ChainPoller) FilterLogs(ctx context.Context, filterQueries []api.Filte
5151
for _, query := range filterQueries {
5252
logs, err := cp.blockchainClient.FilterLogs(ctx, query)
5353
if err != nil {
54+
if errors.Is(err, context.Canceled) {
55+
cp.logger.Debug().
56+
Int64("ChainID", cp.chainID).
57+
Msg("Log filtering canceled due to shutdown")
58+
return allLogs, nil
59+
}
5460
cp.logger.Error().Err(err).Interface("query", query).Msg("Failed to filter logs")
5561
continue
5662
}

0 commit comments

Comments
 (0)