mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-08 13:29:56 +00:00
fix: try to fix maybeAppLimited 2
This commit is contained in:
parent
cd512ce1c6
commit
09b08fa494
@ -715,13 +715,9 @@ func (b *bbrSender) checkIfFullBandwidthReached(lastPacketSendState *sendTimeSta
|
||||
}
|
||||
|
||||
func (b *bbrSender) maybeAppLimited(bytesInFlight congestion.ByteCount) {
|
||||
congestionWindow := b.GetCongestionWindow()
|
||||
// HACK: consider it app-limited if bytes in flight is less than 90% of the congestion window.
|
||||
if bytesInFlight >= congestionWindow*9/10 ||
|
||||
(b.mode == bbrModeDrain && bytesInFlight > congestionWindow/2) {
|
||||
return
|
||||
if bytesInFlight < b.getTargetCongestionWindow(1) {
|
||||
b.sampler.OnAppLimited()
|
||||
}
|
||||
b.sampler.OnAppLimited()
|
||||
}
|
||||
|
||||
// Transitions from STARTUP to DRAIN and from DRAIN to PROBE_BW if
|
||||
|
Loading…
x
Reference in New Issue
Block a user