mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
fix handling of duplicate FIN bits after a stream was canceled
This commit is contained in:
parent
e6e343fc39
commit
63585d1b5e
2 changed files with 23 additions and 2 deletions
|
@ -236,11 +236,13 @@ func (s *receiveStream) handleStreamFrameImpl(frame *wire.StreamFrame) (bool /*
|
|||
if err := s.flowController.UpdateHighestReceived(maxOffset, frame.FinBit); err != nil {
|
||||
return false, err
|
||||
}
|
||||
var newlyRcvdFinalOffset bool
|
||||
if frame.FinBit {
|
||||
newlyRcvdFinalOffset = s.finalOffset == protocol.MaxByteCount
|
||||
s.finalOffset = maxOffset
|
||||
}
|
||||
if s.canceledRead {
|
||||
return frame.FinBit, nil
|
||||
return newlyRcvdFinalOffset, nil
|
||||
}
|
||||
if err := s.frameQueue.Push(frame.Data, frame.Offset, frame.PutBack); err != nil {
|
||||
return false, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue