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

Unified Diff: net/quic/quic_connection.cc

Issue 1138443003: Land Recent QUIC Changes until 05/13/2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile error fixes Created 5 years, 7 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/crypto/quic_crypto_client_config_test.cc ('k') | net/quic/quic_crypto_client_stream.h » ('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 08fc9026f811b0d602447200afbb7b6ca831377f..12f929021fa5177cfadbb030d211060a8207d4d8 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -907,36 +907,59 @@ void QuicConnection::OnPacketComplete() {
if (!last_stream_frames_.empty()) {
visitor_->OnStreamFrames(last_stream_frames_);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
for (size_t i = 0; i < last_stream_frames_.size(); ++i) {
stats_.stream_bytes_received +=
last_stream_frames_[i].data.TotalBufferSize();
}
-
// Process window updates, blocked, stream resets, acks, then congestion
// feedback.
if (!last_window_update_frames_.empty()) {
visitor_->OnWindowUpdateFrames(last_window_update_frames_);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
if (!last_blocked_frames_.empty()) {
visitor_->OnBlockedFrames(last_blocked_frames_);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
for (size_t i = 0; i < last_goaway_frames_.size(); ++i) {
visitor_->OnGoAway(last_goaway_frames_[i]);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
for (size_t i = 0; i < last_rst_frames_.size(); ++i) {
visitor_->OnRstStream(last_rst_frames_[i]);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
for (size_t i = 0; i < last_ack_frames_.size(); ++i) {
ProcessAckFrame(last_ack_frames_[i]);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
for (size_t i = 0; i < last_stop_waiting_frames_.size(); ++i) {
ProcessStopWaitingFrame(last_stop_waiting_frames_[i]);
+ if (!connected_ && !FLAGS_quic_stop_early) {
+ return;
+ }
}
if (!last_close_frames_.empty()) {
CloseConnection(last_close_frames_[0].error_code, true);
DCHECK(!connected_);
+ if (!FLAGS_quic_stop_early) {
+ return;
+ }
}
// If there are new missing packets to report, send an ack immediately.
@@ -959,9 +982,8 @@ void QuicConnection::MaybeQueueAck() {
if (ack_alarm_->IsSet()) {
ack_queued_ = true;
} else {
- // Send an ack much more quickly for crypto handshake packets.
- QuicTime::Delta delayed_ack_time = sent_packet_manager_.DelayedAckTime();
- ack_alarm_->Set(clock_->ApproximateNow().Add(delayed_ack_time));
+ ack_alarm_->Set(
+ clock_->ApproximateNow().Add(sent_packet_manager_.DelayedAckTime()));
DVLOG(1) << "Ack timer set; next packet or timer will trigger ACK.";
}
}
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config_test.cc ('k') | net/quic/quic_crypto_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698