Skip to content

Commit

Permalink
fix bug that worker doesn't return after context cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
hongkuancn committed Aug 29, 2024
1 parent 5f162d4 commit 7f4c992
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func worker(context context.Context, waitGroup *sync.WaitGroup, firstTask func()
// We have received a task, ignore it
taskWaitGroup.Done()
}
return

Check warning on line 34 in worker.go

View check run for this annotation

Codecov / codecov/patch

worker.go#L34

Added line #L34 was not covered by tests
default:
if task == nil || !ok {
// We have received a signal to exit
Expand Down

0 comments on commit 7f4c992

Please sign in to comment.