reliably queue MAX_DATA frames (#4844)

This commit is contained in:
Marten Seemann
2025-01-08 09:53:23 +08:00
committed by GitHub
parent 076db77a26
commit 5a6187c870
12 changed files with 154 additions and 52 deletions

View File

@@ -98,12 +98,12 @@ func (c *streamFlowController) UpdateHighestReceived(offset protocol.ByteCount,
return c.connection.IncrementHighestReceived(increment, now)
}
func (c *streamFlowController) AddBytesRead(n protocol.ByteCount) (shouldQueueWindowUpdate bool) {
func (c *streamFlowController) AddBytesRead(n protocol.ByteCount) (hasStreamWindowUpdate, hasConnWindowUpdate bool) {
c.mutex.Lock()
c.baseFlowController.addBytesRead(n)
shouldQueueWindowUpdate = c.shouldQueueWindowUpdate()
hasStreamWindowUpdate = c.shouldQueueWindowUpdate()
c.mutex.Unlock()
c.connection.AddBytesRead(n)
hasConnWindowUpdate = c.connection.AddBytesRead(n)
return
}