mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-18 18:29:52 +00:00
Small tweak to brutal CC
This commit is contained in:
parent
c7c2e59732
commit
65c26cdfe4
@ -28,7 +28,7 @@ func NewBrutalSender(bps congestion.ByteCount) *BrutalSender {
|
|||||||
bps: bps,
|
bps: bps,
|
||||||
}
|
}
|
||||||
bs.pacer = newPacer(func() congestion.ByteCount {
|
bs.pacer = newPacer(func() congestion.ByteCount {
|
||||||
return congestion.ByteCount(float64(bs.bps)/bs.getAckRate()) * 5 / 4
|
return congestion.ByteCount(float64(bs.bps) / bs.getAckRate())
|
||||||
})
|
})
|
||||||
return bs
|
return bs
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ func (b *BrutalSender) GetCongestionWindow() congestion.ByteCount {
|
|||||||
if rtt <= 0 {
|
if rtt <= 0 {
|
||||||
return 10240
|
return 10240
|
||||||
}
|
}
|
||||||
return congestion.ByteCount(float64(b.bps) * rtt.Seconds() / b.getAckRate())
|
return congestion.ByteCount(float64(b.bps) * rtt.Seconds() * 1.5 / b.getAckRate())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BrutalSender) OnPacketSent(sentTime time.Time, bytesInFlight congestion.ByteCount,
|
func (b *BrutalSender) OnPacketSent(sentTime time.Time, bytesInFlight congestion.ByteCount,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user