always queue window updates when data is being read

There's no need to have a separate call in the flow controller interface
for this.
This commit is contained in:
Marten Seemann
2019-01-22 15:58:43 +07:00
parent ff9bb5bd96
commit bfbf0bca48
9 changed files with 29 additions and 65 deletions

View File

@@ -54,7 +54,12 @@ func (c *connectionFlowController) IncrementHighestReceived(increment protocol.B
return nil
}
func (c *connectionFlowController) MaybeQueueWindowUpdate() {
func (c *connectionFlowController) AddBytesRead(n protocol.ByteCount) {
c.baseFlowController.AddBytesRead(n)
c.maybeQueueWindowUpdate()
}
func (c *connectionFlowController) maybeQueueWindowUpdate() {
c.mutex.Lock()
hasWindowUpdate := c.hasWindowUpdate()
c.mutex.Unlock()