forked from quic-go/quic-go
refactor frame packing to logic to not access the streams map (#4596)
* avoid accessing the streams map when packing stream data * avoid accessing the streams map when packing flow control frames * remove streamGetter interface
This commit is contained in:
@@ -197,7 +197,9 @@ func (s *receiveStream) readImpl(p []byte) (int, error) {
|
||||
// when a RESET_STREAM was received, the flow controller was already
|
||||
// informed about the final byteOffset for this stream
|
||||
if !s.cancelledRemotely {
|
||||
s.flowController.AddBytesRead(protocol.ByteCount(m))
|
||||
if queueWindowUpdate := s.flowController.AddBytesRead(protocol.ByteCount(m)); queueWindowUpdate {
|
||||
s.sender.onHasStreamWindowUpdate(s.streamID, s)
|
||||
}
|
||||
}
|
||||
|
||||
if s.readPosInFrame >= len(s.currentFrame) && s.currentFrameIsLast {
|
||||
|
||||
Reference in New Issue
Block a user