diff --git a/data_reader.go b/data_reader.go index 6367df1..6b27b76 100644 --- a/data_reader.go +++ b/data_reader.go @@ -92,6 +92,10 @@ func (r *internalDataReader) Read(data []byte) (n int, err error) { for len(p) > 0 { var b byte + if n > 0 && r.buffered.Buffered() < 1 { + break + } + b, err = r.buffered.ReadByte() if nil != err { return n, err