Skip to content

Commit

Permalink
catch raw record set write error
Browse files Browse the repository at this point in the history
  • Loading branch information
apacker committed Oct 19, 2023
1 parent df55dc2 commit 47882d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion protocol/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ func (rs *RecordSet) WriteTo(w io.Writer) (int64, error) {
}

func (rrs *RawRecordSet) WriteTo(w io.Writer) (int64, error) {
return io.Copy(w, rrs.Reader)
n, err := io.Copy(w, rrs.Reader)
if err != nil {
return n, fmt.Errorf("kafka.(*RawRecordSet).WriteTo: %w", err)
}
return n, err
}

func makeTime(t int64) time.Time {
Expand Down

0 comments on commit 47882d1

Please sign in to comment.