Skip to content

Commit

Permalink
Add a error verification when failed list error is from context canceled
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Savian <vitor.savian@suse.com>
  • Loading branch information
vitorsavian committed Mar 19, 2024
1 parent 5c1e58f commit 4b9c8c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/logstructured/sqllog/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ func (s *SQLLog) poll(result chan interface{}, pollStart int64) {

rows, err := s.d.After(s.ctx, "%", s.currentRev, pollBatchSize)
if err != nil {
logrus.Errorf("fail to list latest changes: %v", err)
if !errors.Is(err, context.Canceled) {
logrus.Errorf("fail to list latest changes: %v", err)
}
continue
}

Expand Down

0 comments on commit 4b9c8c9

Please sign in to comment.