Use peer_max_ack_delay_ not local_max_ack_delay_ when using the MAD1 QUIC connection option. Both fields are set to identical values, so this is a no-op.
Discovered in cr/258576461, field was split into two in cr/258183470
gfe-relnote: n/a (Fix variable name)
PiperOrigin-RevId: 261369441
Change-Id: I5cb59b5e6c0674a9550c53afa6e9524715d3d796
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index 90771f8..7427b73 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -151,11 +151,15 @@
SetInitialRtt(QuicTime::Delta::FromMicroseconds(
config.GetInitialRoundTripTimeUsToSend()));
}
+ if (config.HasReceivedMaxAckDelayMs()) {
+ peer_max_ack_delay_ =
+ QuicTime::Delta::FromMilliseconds(config.ReceivedMaxAckDelayMs());
+ }
if (config.HasClientSentConnectionOption(kMAD0, perspective)) {
rtt_stats_.set_ignore_max_ack_delay(true);
}
if (config.HasClientSentConnectionOption(kMAD1, perspective)) {
- rtt_stats_.set_initial_max_ack_delay(local_max_ack_delay_);
+ rtt_stats_.set_initial_max_ack_delay(peer_max_ack_delay_);
}
if (config.HasClientSentConnectionOption(kMAD2, perspective)) {
min_tlp_timeout_ = QuicTime::Delta::Zero();
@@ -243,11 +247,6 @@
}
send_algorithm_->SetFromConfig(config, perspective);
- if (config.HasReceivedMaxAckDelayMs()) {
- peer_max_ack_delay_ =
- QuicTime::Delta::FromMilliseconds(config.ReceivedMaxAckDelayMs());
- }
-
if (network_change_visitor_ != nullptr) {
network_change_visitor_->OnCongestionChange();
}