Remove unreachable statement and unused variable from general_loss_algorithm.
gfe-relnote: n/a (remove dead code)
PiperOrigin-RevId: 295739948
Change-Id: I1297c6428cdc33d4f6fc4789013347fcfcfb022f
diff --git a/quic/core/congestion_control/general_loss_algorithm.cc b/quic/core/congestion_control/general_loss_algorithm.cc
index 25ad3a2..5ef2237 100644
--- a/quic/core/congestion_control/general_loss_algorithm.cc
+++ b/quic/core/congestion_control/general_loss_algorithm.cc
@@ -39,7 +39,6 @@
// do not use this optimization if largest_newly_acked is not the largest
// packet in packets_acked.
least_in_flight_ = largest_newly_acked + 1;
- largest_previously_acked_ = largest_newly_acked;
return;
}
// There is hole in acked_packets, increment least_in_flight_ if possible.
@@ -97,18 +96,11 @@
break;
}
packets_lost->push_back(LostPacket(packet_number, it->bytes_sent));
- continue;
-
- if (!least_in_flight_.IsInitialized()) {
- // At this point, packet_number is in flight and not detected as lost.
- least_in_flight_ = packet_number;
- }
}
if (!least_in_flight_.IsInitialized()) {
// There is no in flight packet.
least_in_flight_ = largest_newly_acked + 1;
}
- largest_previously_acked_ = largest_newly_acked;
}
QuicTime GeneralLossAlgorithm::GetLossTimeout() const {
diff --git a/quic/core/congestion_control/general_loss_algorithm.h b/quic/core/congestion_control/general_loss_algorithm.h
index dd390b6..50c5c05 100644
--- a/quic/core/congestion_control/general_loss_algorithm.h
+++ b/quic/core/congestion_control/general_loss_algorithm.h
@@ -81,8 +81,6 @@
bool use_adaptive_reordering_threshold_;
// If true, uses adaptive time threshold for time based loss detection.
bool use_adaptive_time_threshold_;
- // The largest newly acked from the previous call to DetectLosses.
- QuicPacketNumber largest_previously_acked_;
// The least in flight packet. Loss detection should start from this. Please
// note, least_in_flight_ could be largest packet ever sent + 1.
QuicPacketNumber least_in_flight_;