Skip to content

Commit

Permalink
check for posReached before applying any event
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Jan 1, 2025
1 parent 120ab81 commit e054980
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ func (w *parallelWorker) applyQueuedEvents(ctx context.Context) (err error) {
}
}()
for {
if w.pool.posReached.Load() {
return io.EOF
}
select {
case <-ctx.Done():
return ctx.Err()
Expand Down

0 comments on commit e054980

Please sign in to comment.