forked from quic-go/quic-go
update the flow control windows of streams opened in 0-RTT
The server might have increased the initial flow control window. We need to make sure to inform all streams opened during during the 0-RTT period.
This commit is contained in:
@@ -178,6 +178,17 @@ func (m *outgoingItemsMap) SetMaxStream(num protocol.StreamNum) {
|
||||
m.unblockOpenSync()
|
||||
}
|
||||
|
||||
// UpdateSendWindow is called when the peer's transport parameters are received.
|
||||
// Only in the case of a 0-RTT handshake will we have open streams at this point.
|
||||
// We might need to update the send window, in case the server increased it.
|
||||
func (m *outgoingItemsMap) UpdateSendWindow(limit protocol.ByteCount) {
|
||||
m.mutex.Lock()
|
||||
for _, str := range m.streams {
|
||||
str.updateSendWindow(limit)
|
||||
}
|
||||
m.mutex.Unlock()
|
||||
}
|
||||
|
||||
// unblockOpenSync unblocks the next OpenStreamSync go-routine to open a new stream
|
||||
func (m *outgoingItemsMap) unblockOpenSync() {
|
||||
if len(m.openQueue) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user