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

Unified Diff: net/quic/quic_connection.cc

Issue 115463002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « net/quic/quic_config_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index b93fdee08579e00f1f48a5c0716af568c924e3ec..51a83cc41a0afd80b024e938f0fde7090a40ba30 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -659,11 +659,9 @@ void QuicConnection::OnPacketComplete() {
// from unacket_packets_, increasing the least_unacked.
const bool last_packet_should_instigate_ack = ShouldLastPacketInstigateAck();
- // If we are missing any packets from the peer, then we want to ack
- // immediately. We need to check both before and after we process the
- // current packet because we want to ack immediately when we discover
- // a missing packet AND when we receive the last missing packet.
- bool send_ack_immediately = received_packet_manager_.HasMissingPackets();
+ // If the incoming packet was missing, send an ack immediately.
+ bool send_ack_immediately = received_packet_manager_.IsMissing(
+ last_header_.packet_sequence_number);
// Ensure the visitor can process the stream frames before recording and
// processing the rest of the packet.
@@ -698,7 +696,8 @@ void QuicConnection::OnPacketComplete() {
DCHECK(!connected_);
}
- if (received_packet_manager_.HasMissingPackets()) {
+ // If there are new missing packets to report, send an ack immediately.
+ if (received_packet_manager_.HasNewMissingPackets()) {
send_ack_immediately = true;
}
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698