Skip to content

Commit

Permalink
Fix subpool tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alitto committed Oct 20, 2024
1 parent a293ca8 commit bea3bad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (d *Dispatcher[T]) run(ctx context.Context) {
batch = batch[:0]
}

if !ok {
if !ok || d.closed.Load() {
// Channel was closed, read all remaining elements and exit
return
}
Expand Down

0 comments on commit bea3bad

Please sign in to comment.