Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: net/quic/core/quic_connection.cc

Issue 2396833002: Deprecate FLAGS_quic_better_last_send_for_timeout (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index c93735b80839c2411087bb5f6bf6b2687a5b21ad..71ddb8460c228370c9d827445e6bc9d16f0ae505 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -1712,22 +1712,14 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) {
}
if (packet->transmission_type == NOT_RETRANSMISSION) {
time_of_last_sent_new_packet_ = packet_send_time;
- if (!FLAGS_quic_better_last_send_for_timeout) {
- if (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA &&
- last_send_for_timeout_ <= time_of_last_received_packet_) {
- last_send_for_timeout_ = packet_send_time;
- }
- }
}
- if (FLAGS_quic_better_last_send_for_timeout) {
- // 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 (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA &&
- last_send_for_timeout_ <= time_of_last_received_packet_) {
- last_send_for_timeout_ = packet_send_time;
- }
+ // 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 (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA &&
+ last_send_for_timeout_ <= time_of_last_received_packet_) {
+ last_send_for_timeout_ = packet_send_time;
}
SetPingAlarm();
MaybeSetMtuAlarm();
@@ -2236,10 +2228,8 @@ void QuicConnection::CheckForTimeout() {
void QuicConnection::SetTimeoutAlarm() {
QuicTime time_of_last_packet =
max(time_of_last_received_packet_, time_of_last_sent_new_packet_);
- if (FLAGS_quic_better_last_send_for_timeout) {
- time_of_last_packet =
- max(time_of_last_received_packet_, last_send_for_timeout_);
- }
+ time_of_last_packet =
+ max(time_of_last_received_packet_, last_send_for_timeout_);
QuicTime deadline = time_of_last_packet + idle_network_timeout_;
if (!handshake_timeout_.IsInfinite()) {
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698