forked from quic-go/quic-go
Merge pull request #645 from qdeconinck/fix-connection-stall-wuf-0
fix stalls when retransmitting connection-level Window Update Frames
This commit is contained in:
@@ -157,6 +157,11 @@ func (f *flowControlManager) GetReceiveWindow(streamID protocol.StreamID) (proto
|
|||||||
f.mutex.RLock()
|
f.mutex.RLock()
|
||||||
defer f.mutex.RUnlock()
|
defer f.mutex.RUnlock()
|
||||||
|
|
||||||
|
// StreamID can be 0 when retransmitting
|
||||||
|
if streamID == 0 {
|
||||||
|
return f.connFlowController.receiveWindow, nil
|
||||||
|
}
|
||||||
|
|
||||||
flowController, err := f.getFlowController(streamID)
|
flowController, err := f.getFlowController(streamID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
|
|||||||
@@ -103,6 +103,12 @@ var _ = Describe("Flow Control Manager", func() {
|
|||||||
Expect(err).To(MatchError(errMapAccess))
|
Expect(err).To(MatchError(errMapAccess))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
It("gets the offset of the connection-level receive window", func() {
|
||||||
|
offset, err := fcm.GetReceiveWindow(0)
|
||||||
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
Expect(offset).To(Equal(protocol.ByteCount(200)))
|
||||||
|
})
|
||||||
|
|
||||||
Context("flow control violations", func() {
|
Context("flow control violations", func() {
|
||||||
It("errors when encountering a stream level flow control violation", func() {
|
It("errors when encountering a stream level flow control violation", func() {
|
||||||
err := fcm.UpdateHighestReceived(4, 101)
|
err := fcm.UpdateHighestReceived(4, 101)
|
||||||
|
|||||||
Reference in New Issue
Block a user