Deprecate --gfe2_reloadable_flag_quic_close_connection_with_too_many_outstanding_packets.

PiperOrigin-RevId: 369443000
Change-Id: I1796c47eff1aa1ed6ae4e2922b022e6d5dc368ed
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 74931d0..a3a0cd5 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -2380,23 +2380,13 @@
 }
 
 void QuicConnection::CloseIfTooManyOutstandingSentPackets() {
-  bool should_close;
-  if (GetQuicReloadableFlag(
-          quic_close_connection_with_too_many_outstanding_packets)) {
-    QUIC_RELOADABLE_FLAG_COUNT(
-        quic_close_connection_with_too_many_outstanding_packets);
-    should_close =
-        sent_packet_manager_.GetLargestSentPacket().IsInitialized() &&
-        sent_packet_manager_.GetLargestSentPacket() >
-            sent_packet_manager_.GetLeastUnacked() + max_tracked_packets_;
-  } else {
-    should_close =
-        sent_packet_manager_.GetLargestObserved().IsInitialized() &&
-        sent_packet_manager_.GetLargestObserved() >
-            sent_packet_manager_.GetLeastUnacked() + max_tracked_packets_;
-  }
   // This occurs if we don't discard old packets we've seen fast enough. It's
   // possible largest observed is less than leaset unacked.
+  const bool should_close =
+      sent_packet_manager_.GetLargestSentPacket().IsInitialized() &&
+      sent_packet_manager_.GetLargestSentPacket() >
+          sent_packet_manager_.GetLeastUnacked() + max_tracked_packets_;
+
   if (should_close) {
     CloseConnection(
         QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS,
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index e73298d..fed771b 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -3186,20 +3186,6 @@
 
   ProcessFramePacket(QuicFrame(QuicPingFrame()));
 
-  if (!GetQuicReloadableFlag(
-          quic_close_connection_with_too_many_outstanding_packets)) {
-    // When the flag is false, the ping packet processed above shouldn't cause
-    // the connection to close. But the ack packet below will.
-    EXPECT_TRUE(connection_.connected());
-
-    // Ack packet 1, which leaves more than the limit outstanding.
-    EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _));
-
-    // Nack the first packet and ack the rest, leaving a huge gap.
-    QuicAckFrame frame1 = ConstructAckFrame(num_packets, 1);
-    ProcessAckPacket(&frame1);
-  }
-
   TestConnectionCloseQuicErrorCode(QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS);
 }
 
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 0834db6..157b70a 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -17,7 +17,6 @@
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_bbr2_avoid_too_low_probe_bw_cwnd, false)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_bbr2_fix_bw_lo_mode, false)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_can_send_ack_frequency, true)
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_close_connection_with_too_many_outstanding_packets, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_connection_support_multiple_cids_v4, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_conservative_bursts, false)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_conservative_cwnd_and_pacing_gains, false)