forked from quic-go/quic-go
fix stalls when retransmitting connection-level Window Update Frames
When a Window Update Frame with streamID 0 is lost, we want to know the receive window when retransmitting the frame. However, the connection flow controller is not in streamFlowController, leading to map access errors and then connections stalls since the sender is stuck by the not-updated receive window it previously received.
This commit is contained in:
@@ -157,6 +157,11 @@ func (f *flowControlManager) GetReceiveWindow(streamID protocol.StreamID) (proto
|
||||
f.mutex.RLock()
|
||||
defer f.mutex.RUnlock()
|
||||
|
||||
// StreamID can be 0 when retransmitting
|
||||
if streamID == 0 {
|
||||
return f.connFlowController.receiveWindow, nil
|
||||
}
|
||||
|
||||
flowController, err := f.getFlowController(streamID)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
||||
Reference in New Issue
Block a user