Skip to content

Commit

Permalink
small fix with Gosched
Browse files Browse the repository at this point in the history
  • Loading branch information
Skandalik committed Oct 5, 2021
1 parent 4e2ccd2 commit 97180a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kafka/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ func (s *Source) Commit(v interface{}) error {
// If commit strategy is not CommitAuto, session should perform global, synchronous commit of current marked offsets.
if s.commitStrategy != CommitAuto {
s.session.Commit()
runtime.Gosched() // If any error from consumer side happens after Commiting, it will be read and s.lastErr will be set.
}

runtime.Gosched() // If any error from consumer side happens after Commiting, it will be read and s.lastErr will be set.
return s.lastErr
}

Expand Down

0 comments on commit 97180a7

Please sign in to comment.