Skip to content

Commit 4022989

Browse files
committed
do not log error on shutdown
1 parent 80976ad commit 4022989

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

rollup/rollup_sync_service/rollup_sync_service.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ func (s *RollupSyncService) Start() {
146146
case <-syncTicker.C:
147147
err := s.fetchRollupEvents()
148148
if err != nil {
149+
// Do not log the error if the context is canceled.
150+
select {
151+
case <-s.ctx.Done():
152+
return
153+
default:
154+
}
155+
149156
log.Error("failed to fetch rollup events", "err", err)
150157
}
151158
case <-logTicker.C:

0 commit comments

Comments
 (0)