Fix calculating of buffer length at reset

This commit is contained in:
Masaaki Goshima 2021-05-06 02:46:01 +09:00
parent d4a64f8cde
commit 3b4e3255e3
1 changed files with 1 additions and 1 deletions

View File

@ -61,8 +61,8 @@ func (s *stream) statForRetry() ([]byte, int64, unsafe.Pointer) {
func (s *stream) reset() { func (s *stream) reset() {
s.offset += s.cursor s.offset += s.cursor
s.buf = s.buf[s.cursor:] s.buf = s.buf[s.cursor:]
s.length -= s.cursor
s.cursor = 0 s.cursor = 0
s.length = int64(len(s.buf))
} }
func (s *stream) readBuf() []byte { func (s *stream) readBuf() []byte {