diff --git a/common/buf/merge_reader.go b/common/buf/merge_reader.go index 5dc8df656..a272163de 100644 --- a/common/buf/merge_reader.go +++ b/common/buf/merge_reader.go @@ -15,7 +15,9 @@ func NewMergingReader(reader Reader) Reader { func (r *MergingReader) Read() (*Buffer, error) { if r.leftover != nil { - return r.leftover, nil + b := r.leftover + r.leftover = nil + return b, nil } b, err := r.reader.Read()