simplify generation of STREAM_DATA_BLOCKED frames (#4608)

The stream always gets blocked at the current write offset. There's no
need to return this offset from the flow controller.
This commit is contained in:
Marten Seemann
2024-08-01 13:08:09 -07:00
committed by GitHub
parent 8d821f4bc8
commit b8ea5c7981
5 changed files with 31 additions and 55 deletions

View File

@@ -121,6 +121,11 @@ func (c *streamFlowController) SendWindowSize() protocol.ByteCount {
return min(c.baseFlowController.sendWindowSize(), c.connection.SendWindowSize())
}
func (c *streamFlowController) IsNewlyBlocked() bool {
blocked, _ := c.baseFlowController.IsNewlyBlocked()
return blocked
}
func (c *streamFlowController) shouldQueueWindowUpdate() bool {
return !c.receivedFinalOffset && c.hasWindowUpdate()
}