From bea51cf5f203248ace2d34aa8cdb11b2cfef661e Mon Sep 17 00:00:00 2001 From: Wesley Eddy Date: Thu, 14 Nov 2024 18:22:59 -0800 Subject: [PATCH] Fix comment on bandwidth sampler. Summary: The comment is the reverse of the actual logic. When app-limited, bandwidth samples are not considered valid, because the data being sent is being limited by the application and not the network. Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: jbeshay Differential Revision: D65976022 fbshipit-source-id: 0c52bab2edb560afe5e885b0df33090935490778 --- quic/congestion_control/BbrBandwidthSampler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quic/congestion_control/BbrBandwidthSampler.cpp b/quic/congestion_control/BbrBandwidthSampler.cpp index e87d754af..867e42e2f 100644 --- a/quic/congestion_control/BbrBandwidthSampler.cpp +++ b/quic/congestion_control/BbrBandwidthSampler.cpp @@ -125,7 +125,7 @@ void BbrBandwidthSampler::onPacketAcked( } Bandwidth measuredBandwidth = sendRate > ackRate ? sendRate : ackRate; - // This is a valid sample if the packet was sent while app-limited or + // This is a valid sample if the packet was sent while not app-limited or // it's higher than the current sample. if (!ackedPacket.isAppLimited || measuredBandwidth > latestSample_) { latestSample_ = measuredBandwidth;