Merge pull request #1538 from ludweeg/ludweeg/assignOp

simplify `x = x <op> ...` to `x <op>= ...`
This commit is contained in:
Lucas Clemente
2018-10-09 09:59:06 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -633,7 +633,7 @@ func (h *sentPacketHandler) computeRTOTimeout() time.Duration {
}
rto = utils.MaxDuration(rto, minRTOTimeout)
// Exponential backoff
rto = rto << h.rtoCount
rto <<= h.rtoCount
return utils.MinDuration(rto, maxRTOTimeout)
}

View File

@@ -193,7 +193,7 @@ func (c *cubicSender) OnPacketLost(
if c.congestionWindow >= 2*c.initialCongestionWindow {
c.minSlowStartExitWindow = c.congestionWindow / 2
}
c.congestionWindow = c.congestionWindow - protocol.DefaultTCPMSS
c.congestionWindow -= protocol.DefaultTCPMSS
} else if c.reno {
c.congestionWindow = protocol.ByteCount(float32(c.congestionWindow) * c.RenoBeta())
} else {