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

Unified Diff: net/quic/quic_connection.cc

Issue 512933005: Fix a QUIC bug in which PING frames were not being ACK'd. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « net/quic/quic_connection.h ('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 ab1e0fe8de4158f8b83c41e962a17843d4154a26..a9ad334afa64dafb62b1afc9d5d72aae029e8380 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -300,13 +300,15 @@ void QuicConnection::OnError(QuicFramer* framer) {
void QuicConnection::OnPacket() {
DCHECK(last_stream_frames_.empty() &&
+ last_ack_frames_.empty() &&
+ last_congestion_frames_.empty() &&
+ last_stop_waiting_frames_.empty() &&
+ last_rst_frames_.empty() &&
last_goaway_frames_.empty() &&
last_window_update_frames_.empty() &&
last_blocked_frames_.empty() &&
- last_rst_frames_.empty() &&
- last_ack_frames_.empty() &&
- last_congestion_frames_.empty() &&
- last_stop_waiting_frames_.empty());
+ last_ping_frames_.empty() &&
+ last_close_frames_.empty());
}
void QuicConnection::OnPublicResetPacket(
@@ -617,6 +619,7 @@ bool QuicConnection::OnPingFrame(const QuicPingFrame& frame) {
if (debug_visitor_.get() != NULL) {
debug_visitor_->OnPingFrame(frame);
}
+ last_ping_frames_.push_back(frame);
return true;
}
@@ -778,17 +781,17 @@ void QuicConnection::OnPacketComplete() {
DVLOG(1) << ENDPOINT << (last_packet_revived_ ? "Revived" : "Got")
<< " packet " << last_header_.packet_sequence_number
- << " with " << last_ack_frames_.size() << " acks, "
+ << " with " << last_stream_frames_.size()<< " stream frames "
+ << last_ack_frames_.size() << " acks, "
<< last_congestion_frames_.size() << " congestions, "
<< last_stop_waiting_frames_.size() << " stop_waiting, "
+ << last_rst_frames_.size() << " rsts, "
<< last_goaway_frames_.size() << " goaways, "
<< last_window_update_frames_.size() << " window updates, "
<< last_blocked_frames_.size() << " blocked, "
- << last_rst_frames_.size() << " rsts, "
+ << last_ping_frames_.size() << " pings, "
<< last_close_frames_.size() << " closes, "
- << last_stream_frames_.size()
- << " stream frames for "
- << last_header_.public_header.connection_id;
+ << "for " << last_header_.public_header.connection_id;
// Call MaybeQueueAck() before recording the received packet, since we want
// to trigger an ack if the newly received packet was previously missing.
@@ -881,13 +884,15 @@ void QuicConnection::MaybeQueueAck() {
void QuicConnection::ClearLastFrames() {
last_stream_frames_.clear();
+ last_ack_frames_.clear();
+ last_congestion_frames_.clear();
+ last_stop_waiting_frames_.clear();
+ last_rst_frames_.clear();
last_goaway_frames_.clear();
last_window_update_frames_.clear();
last_blocked_frames_.clear();
- last_rst_frames_.clear();
- last_ack_frames_.clear();
- last_stop_waiting_frames_.clear();
- last_congestion_frames_.clear();
+ last_ping_frames_.clear();
+ last_close_frames_.clear();
}
QuicAckFrame* QuicConnection::CreateAckFrame() {
@@ -913,7 +918,8 @@ bool QuicConnection::ShouldLastPacketInstigateAck() const {
!last_goaway_frames_.empty() ||
!last_rst_frames_.empty() ||
!last_window_update_frames_.empty() ||
- !last_blocked_frames_.empty()) {
+ !last_blocked_frames_.empty() ||
+ !last_ping_frames_.empty()) {
return true;
}
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698