Skip to content

Commit

Permalink
ensure storing pos on EOF
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 a75b425 commit b3e9fdc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ func (w *parallelWorker) applyQueuedEvents(ctx context.Context) (err error) {
case vevent := <-w.events:
if err := w.applyQueuedEvent(ctx, vevent); err != nil {
if err == io.EOF {
if !w.lastPos.IsZero() {
w.vp.pos.Store(&w.lastPos)
}
return err
}
// Not EOF
Expand Down

0 comments on commit b3e9fdc

Please sign in to comment.