Skip to content

Commit 7f57f38

Browse files
authored
Merge pull request #389 from cschleiden/copilot/vscode1752205439658
Do not report error when context is canceled while polling for tasks
2 parents 4dacc44 + b44fc5a commit 7f57f38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/worker/worker.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ func (w *Worker[Task, TaskResult]) poller(ctx context.Context) {
116116

117117
task, err := w.poll(ctx, 30*time.Second)
118118
if err != nil {
119-
w.logger.ErrorContext(ctx, "error polling task", "error", err)
119+
if !errors.Is(err, context.Canceled) {
120+
w.logger.ErrorContext(ctx, "error polling task", "error", err)
121+
}
120122
} else if task != nil {
121123
w.taskQueue <- task
122124
continue // check for new tasks right away

0 commit comments

Comments
 (0)