implement generic Min and Max functions

This commit is contained in:
Marten Seemann
2022-07-25 16:10:36 -04:00
parent 424325af58
commit 43bde14cf7
28 changed files with 103 additions and 258 deletions

View File

@@ -123,7 +123,7 @@ func (c *streamFlowController) AddBytesSent(n protocol.ByteCount) {
}
func (c *streamFlowController) SendWindowSize() protocol.ByteCount {
return utils.MinByteCount(c.baseFlowController.sendWindowSize(), c.connection.SendWindowSize())
return utils.Min(c.baseFlowController.sendWindowSize(), c.connection.SendWindowSize())
}
func (c *streamFlowController) shouldQueueWindowUpdate() bool {