gfe-relnote: Deprecate --gfe2_reloadable_flag_quic_fix_time_of_first_packet_sent_after_receiving. PiperOrigin-RevId: 254043116 Change-Id: I996b5ddb083660867dad9268afb2e4a120b14f80
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 71d3156..bca1ca3 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -304,11 +304,7 @@ this), idle_network_timeout_(QuicTime::Delta::Infinite()), handshake_timeout_(QuicTime::Delta::Infinite()), - time_of_first_packet_sent_after_receiving_( - GetQuicReloadableFlag( - quic_fix_time_of_first_packet_sent_after_receiving) - ? QuicTime::Zero() - : clock_->ApproximateNow()), + time_of_first_packet_sent_after_receiving_(QuicTime::Zero()), time_of_last_received_packet_(clock_->ApproximateNow()), time_of_previous_received_packet_(QuicTime::Zero()), sent_packet_manager_( @@ -2569,27 +2565,13 @@ SetPathDegradingAlarm(); } - if (GetQuicReloadableFlag( - quic_fix_time_of_first_packet_sent_after_receiving)) { - // Update |time_of_first_packet_sent_after_receiving_| if this is the - // first packet sent after the last packet was received. If it were - // updated on every sent packet, then sending into a black hole might - // never timeout. - if (time_of_first_packet_sent_after_receiving_ < - time_of_last_received_packet_) { - QUIC_RELOADABLE_FLAG_COUNT( - quic_fix_time_of_first_packet_sent_after_receiving); - time_of_first_packet_sent_after_receiving_ = packet_send_time; - } - } else { - // Only adjust the last sent time (for the purpose of tracking the idle - // timeout) if this is the first retransmittable packet sent after a - // packet is received. If it were updated on every sent packet, then - // sending into a black hole might never timeout. - if (time_of_first_packet_sent_after_receiving_ <= - time_of_last_received_packet_) { - time_of_first_packet_sent_after_receiving_ = packet_send_time; - } + // Update |time_of_first_packet_sent_after_receiving_| if this is the + // first packet sent after the last packet was received. If it were + // updated on every sent packet, then sending into a black hole might + // never timeout. + if (time_of_first_packet_sent_after_receiving_ < + time_of_last_received_packet_) { + time_of_first_packet_sent_after_receiving_ = packet_send_time; } }
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc index 534b6a3..58d84a1 100644 --- a/quic/core/quic_connection_test.cc +++ b/quic/core/quic_connection_test.cc
@@ -4473,28 +4473,11 @@ SendStreamDataToPeer(1, "foo", 0, NO_FIN, &last_packet); EXPECT_EQ(QuicPacketNumber(2u), last_packet); - if (GetQuicReloadableFlag( - quic_fix_time_of_first_packet_sent_after_receiving)) { - // Simulate the timeout alarm firing, the connection will be closed. - EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_NETWORK_IDLE_TIMEOUT, _, - ConnectionCloseSource::FROM_SELF)); - clock_.AdvanceTime(initial_ddl - clock_.ApproximateNow()); - connection_.GetTimeoutAlarm()->Fire(); - } else { - // Simulate the timeout alarm firing, the connection will not be closed. - EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(0); - clock_.AdvanceTime(initial_ddl - clock_.ApproximateNow()); - connection_.GetTimeoutAlarm()->Fire(); - EXPECT_TRUE(connection_.GetTimeoutAlarm()->IsSet()); - EXPECT_TRUE(connection_.connected()); - - // Advance another 20ms, and fire the alarm again. The connection will be - // closed. - EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_NETWORK_IDLE_TIMEOUT, _, - ConnectionCloseSource::FROM_SELF)); - clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); - connection_.GetTimeoutAlarm()->Fire(); - } + // Simulate the timeout alarm firing, the connection will be closed. + EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_NETWORK_IDLE_TIMEOUT, _, + ConnectionCloseSource::FROM_SELF)); + clock_.AdvanceTime(initial_ddl - clock_.ApproximateNow()); + connection_.GetTimeoutAlarm()->Fire(); EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet()); EXPECT_FALSE(connection_.connected());