mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-07-03 17:59:51 +00:00
fix: zero initMaxDatagramSize in brutal CC (wtf...)
This commit is contained in:
parent
b593df44b7
commit
a4a4130ba1
@ -6,6 +6,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
initMaxDatagramSize = 1252
|
||||
|
||||
pktInfoSlotCount = 4
|
||||
minSampleCount = 50
|
||||
minAckRate = 0.75
|
||||
@ -28,7 +30,8 @@ type pktInfo struct {
|
||||
|
||||
func NewBrutalSender(bps congestion.ByteCount) *BrutalSender {
|
||||
bs := &BrutalSender{
|
||||
bps: bps,
|
||||
bps: bps,
|
||||
maxDatagramSize: initMaxDatagramSize,
|
||||
}
|
||||
bs.pacer = newPacer(func() congestion.ByteCount {
|
||||
return congestion.ByteCount(float64(bs.bps) / bs.getAckRate())
|
||||
|
@ -7,9 +7,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
initMaxDatagramSize = 1252
|
||||
maxBurstPackets = 10
|
||||
minPacingDelay = time.Millisecond
|
||||
maxBurstPackets = 10
|
||||
minPacingDelay = time.Millisecond
|
||||
)
|
||||
|
||||
// The pacer implements a token bucket pacing algorithm.
|
||||
|
Loading…
x
Reference in New Issue
Block a user