mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-13 15:59:57 +00:00
feat: minAckRate = 0.75
This commit is contained in:
parent
8e1f43093a
commit
23ed99ad05
@ -8,6 +8,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
pktInfoSlotCount = 4
|
pktInfoSlotCount = 4
|
||||||
minSampleCount = 50
|
minSampleCount = 50
|
||||||
|
minAckRate = 0.75
|
||||||
)
|
)
|
||||||
|
|
||||||
type BrutalSender struct {
|
type BrutalSender struct {
|
||||||
@ -113,8 +114,8 @@ func (b *BrutalSender) getAckRate() float64 {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
rate := float64(ackCount) / float64(ackCount+lossCount)
|
rate := float64(ackCount) / float64(ackCount+lossCount)
|
||||||
if rate < 0.5 {
|
if rate < minAckRate {
|
||||||
return 0.5
|
return minAckRate
|
||||||
}
|
}
|
||||||
return rate
|
return rate
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user