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

Unified Diff: net/quic/quic_connection.cc

Issue 742823005: Change from setting QUIC's ack timer to 0ms when any handshake packet is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Preparation_for_bandwidth
Patch Set: Created 6 years, 1 month 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_client_session_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 716aa854486a2a0eb916eba7869b1a6368098c61..62cbc6465ff0d63eb16175c74cc37b7bac355f42 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -916,10 +916,6 @@ void QuicConnection::MaybeQueueAck() {
} else {
// Send an ack much more quickly for crypto handshake packets.
QuicTime::Delta delayed_ack_time = sent_packet_manager_.DelayedAckTime();
- if (last_stream_frames_.size() == 1 &&
- last_stream_frames_[0].stream_id == kCryptoStreamId) {
- delayed_ack_time = QuicTime::Delta::Zero();
- }
ack_alarm_->Set(clock_->ApproximateNow().Add(delayed_ack_time));
DVLOG(1) << "Ack timer set; next packet or timer will trigger ACK.";
}
@@ -1609,6 +1605,12 @@ void QuicConnection::OnCongestionWindowChange() {
void QuicConnection::OnHandshakeComplete() {
sent_packet_manager_.SetHandshakeConfirmed();
+ // The client should immediately ack the SHLO to confirm the handshake is
+ // complete with the server.
+ if (!is_server_ && !ack_queued_) {
+ ack_alarm_->Cancel();
+ ack_alarm_->Set(clock_->ApproximateNow());
+ }
}
void QuicConnection::SendOrQueuePacket(QueuedPacket packet) {
« no previous file with comments | « net/quic/quic_client_session_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698