TUN-5408: Update quic package to v0.24.0

This commit is contained in:
cthuang
2021-11-10 18:45:26 +00:00
committed by Chung Ting Huang
parent 157f5d1412
commit e71b88fcaa
18 changed files with 66 additions and 59 deletions

View File

@@ -166,13 +166,10 @@ func (s *receiveStream) readImpl(p []byte) (bool /*stream completed */, int, err
return false, bytesRead, fmt.Errorf("BUG: readPosInFrame (%d) > frame.DataLen (%d) in stream.Read", s.readPosInFrame, len(s.currentFrame))
}
s.mutex.Unlock()
m := copy(p[bytesRead:], s.currentFrame[s.readPosInFrame:])
s.readPosInFrame += m
bytesRead += m
s.mutex.Lock()
// when a RESET_STREAM was received, the was already informed about the final byteOffset for this stream
if !s.resetRemotely {
s.flowController.AddBytesRead(protocol.ByteCount(m))