forked from quic-go/quic-go
fix accounting for lost RESET_STREAM frames in the send stream (#4804)
This commit is contained in:
@@ -597,6 +597,7 @@ func (s *sendStreamResetStreamHandler) OnAcked(wire.Frame) {
|
||||
func (s *sendStreamResetStreamHandler) OnLost(wire.Frame) {
|
||||
s.mutex.Lock()
|
||||
s.queuedResetStreamFrame = true
|
||||
s.numOutstandingFrames--
|
||||
s.mutex.Unlock()
|
||||
s.sender.onHasStreamControlFrame(s.streamID, (*sendStream)(s))
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ func TestSendStreamCancellationResetStreamRetransmission(t *testing.T) {
|
||||
require.False(t, hasMore)
|
||||
require.True(t, mockCtrl.Satisfied())
|
||||
|
||||
// lose the frame
|
||||
// lose the RESET_STREAM frame
|
||||
mockSender.EXPECT().onHasStreamControlFrame(streamID, str)
|
||||
f1.Handler.OnLost(f1.Frame)
|
||||
// get the retransmission
|
||||
@@ -751,9 +751,8 @@ func TestSendStreamCancellationResetStreamRetransmission(t *testing.T) {
|
||||
require.False(t, hasMore)
|
||||
require.True(t, mockCtrl.Satisfied())
|
||||
|
||||
// acknowledge the frame
|
||||
// TODO(#4803): this should complete the stream, if we correctly accounted for lost RESET_STREAM frames
|
||||
// mockSender.EXPECT().onStreamCompleted(streamID)
|
||||
// acknowledging the RESET_STREAM frame completes the stream
|
||||
mockSender.EXPECT().onStreamCompleted(streamID)
|
||||
f2.Handler.OnAcked(f2.Frame)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user