Skip to content

Commit 42307d0

Browse files
committed
Ensure task reservation is released
1 parent a6626fa commit 42307d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/worker/worker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func (w *Worker[Task, TaskResult]) poller(ctx context.Context) {
125125
if err != nil {
126126
if !errors.Is(err, context.Canceled) {
127127
w.logger.ErrorContext(ctx, "error polling task", "error", err)
128+
w.taskQueue.release()
128129
}
129130
} else if task != nil {
130131
if err := w.taskQueue.add(ctx, task); err != nil {

0 commit comments

Comments
 (0)