mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +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
|
@ -538,6 +538,25 @@ var _ = Describe("Receive Stream", func() {
|
|||
FinBit: true,
|
||||
})).To(Succeed())
|
||||
})
|
||||
|
||||
It("handles duplicate FinBits after the stream was canceled", func() {
|
||||
mockSender.EXPECT().queueControlFrame(gomock.Any())
|
||||
str.CancelRead(1234)
|
||||
gomock.InOrder(
|
||||
mockFC.EXPECT().UpdateHighestReceived(protocol.ByteCount(1000), true),
|
||||
mockFC.EXPECT().Abandon(),
|
||||
mockFC.EXPECT().UpdateHighestReceived(protocol.ByteCount(1000), true),
|
||||
)
|
||||
mockSender.EXPECT().onStreamCompleted(streamID)
|
||||
Expect(str.handleStreamFrame(&wire.StreamFrame{
|
||||
Offset: 1000,
|
||||
FinBit: true,
|
||||
})).To(Succeed())
|
||||
Expect(str.handleStreamFrame(&wire.StreamFrame{
|
||||
Offset: 1000,
|
||||
FinBit: true,
|
||||
})).To(Succeed())
|
||||
})
|
||||
})
|
||||
|
||||
Context("receiving RESET_STREAM frames", func() {
|
||||
|
@ -564,7 +583,7 @@ var _ = Describe("Receive Stream", func() {
|
|||
mockFC.EXPECT().UpdateHighestReceived(protocol.ByteCount(42), true),
|
||||
mockFC.EXPECT().Abandon(),
|
||||
)
|
||||
str.handleResetStreamFrame(rst)
|
||||
Expect(str.handleResetStreamFrame(rst)).To(Succeed())
|
||||
Eventually(done).Should(BeClosed())
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue