Skip to content

Commit

Permalink
group: avoid concurrently setting err; use better log message
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Mar 29, 2021
1 parent ca32e19 commit d74bbc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/kgo/consumer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,8 @@ start:
select {
case <-fetchDone:
case <-ctx.Done():
err = ctx.Err()
g.cl.cfg.logger.Log(LogLevelError, "fetch offsets failed due to context cancelation")
return ctx.Err()
}
if err != nil {
g.cl.cfg.logger.Log(LogLevelError, "fetch offsets failed with non-retriable error", "err", err)
Expand Down

0 comments on commit d74bbc3

Please sign in to comment.