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

Unified Diff: net/quic/quic_connection.cc

Issue 1142543002: Fixing a bug in the QUIC code where we could create new streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_stateless_reject_92677792
Patch Set: 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 | « no previous file | net/quic/quic_flags.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..91bca3152011a31c9676f65de28b141129087963 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.
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698