Skip to content

Commit

Permalink
Offset.AfterMilli: properly save noReset
Browse files Browse the repository at this point in the history
We returned a new offset, which was fine for the most part but we missed
copying noReset.
  • Loading branch information
twmb committed May 2, 2022
1 parent ce7a84f commit 744a60e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/kgo/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ func NoResetOffset() Offset {
// timestamp. You can use NoResetOffset().AfterMilli(...) to instead switch the
// client to a fatal state.
func (o Offset) AfterMilli(millisec int64) Offset {
return Offset{
at: millisec,
afterMilli: true,
}
o.at = millisec
o.relative = 0
o.epoch = -1
o.afterMilli = true
return o
}

// AtStart returns a copy of the calling offset, changing the returned offset
Expand Down

0 comments on commit 744a60e

Please sign in to comment.