forked from quic-go/quic-go
remove redundant parenthesis and type conversion in flow controller
This commit is contained in:
@@ -76,7 +76,7 @@ func (c *baseFlowController) AddBytesRead(n protocol.ByteCount) {
|
|||||||
func (c *baseFlowController) hasWindowUpdate() bool {
|
func (c *baseFlowController) hasWindowUpdate() bool {
|
||||||
bytesRemaining := c.receiveWindow - c.bytesRead
|
bytesRemaining := c.receiveWindow - c.bytesRead
|
||||||
// update the window when more than the threshold was consumed
|
// update the window when more than the threshold was consumed
|
||||||
return bytesRemaining <= protocol.ByteCount((float64(c.receiveWindowSize) * float64((1 - protocol.WindowUpdateThreshold))))
|
return bytesRemaining <= protocol.ByteCount(float64(c.receiveWindowSize)*(1-protocol.WindowUpdateThreshold))
|
||||||
}
|
}
|
||||||
|
|
||||||
// getWindowUpdate updates the receive window, if necessary
|
// getWindowUpdate updates the receive window, if necessary
|
||||||
|
|||||||
Reference in New Issue
Block a user