Skip to content

Commit

Permalink
check error from GetAvailableOffsets (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogpeppe authored Apr 29, 2020
1 parent 2b2bd70 commit 1baa81f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions offsetquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ func (r *offsetQueryer) getOffsets(ctx context.Context, q map[int32]map[offsetRe
for i := 0; i < nqueries; i++ {
select {
case result := <-resultc:
if result.err != nil {
return fmt.Errorf("cannot get available offsets: %v", result.err)
}
ps, ok := result.resp.Blocks[r.topic]
if !ok {
return fmt.Errorf("topic %q not found in offsets response", r.topic)
Expand Down

0 comments on commit 1baa81f

Please sign in to comment.