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

Unified Diff: net/quic/quic_session.cc

Issue 1343093003: Landing Recent QUIC changes until 9/2/2015 17:00 UTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with TOT Created 5 years, 3 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_sent_entropy_manager_test.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index c2e2f2b707313a340f453a5127d2c7ae3da432d2..0dff60e39667f18f085a079516dac9e56a3c0241 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -631,40 +631,22 @@ ReliableQuicStream* QuicSession::GetIncomingDynamicStream(
}
implicitly_created_streams_.erase(stream_id);
if (stream_id > largest_peer_created_stream_id_) {
- if (FLAGS_exact_stream_id_delta) {
- // Check if the number of streams that will be created (including
- // implicitly open streams) would cause the number of open streams to
- // exceed the limit. Note that the peer can create only
- // alternately-numbered streams.
- if ((stream_id - largest_peer_created_stream_id_) / 2 +
- GetNumOpenStreams() >
- get_max_open_streams()) {
- DVLOG(1) << "Failed to create a new incoming stream with id:"
- << stream_id << ". Already " << GetNumOpenStreams()
- << " streams open, would exceed max " << get_max_open_streams()
- << ".";
- // We may already have sent a connection close due to multiple reset
- // streams in the same packet.
- if (connection()->connected()) {
- connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS);
- }
- return nullptr;
- }
- } else {
- // Limit on the delta between stream IDs.
- const QuicStreamId kMaxStreamIdDelta = 200;
- if (stream_id - largest_peer_created_stream_id_ > kMaxStreamIdDelta) {
- // We may already have sent a connection close due to multiple reset
- // streams in the same packet.
- if (connection()->connected()) {
- LOG(ERROR) << "Trying to get stream: " << stream_id
- << ", largest peer created stream: "
- << largest_peer_created_stream_id_
- << ", max delta: " << kMaxStreamIdDelta;
- connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID);
- }
- return nullptr;
+ // Check if the number of streams that will be created (including implicitly
+ // open streams) would cause the number of open streams to exceed the limit.
+ // Note that the peer can create only alternately-numbered streams.
+ if ((stream_id - largest_peer_created_stream_id_) / 2 +
+ GetNumOpenStreams() >
+ get_max_open_streams()) {
+ DVLOG(1) << "Failed to create a new incoming stream with id:" << stream_id
+ << ". Already " << GetNumOpenStreams()
+ << " streams open, would exceed max " << get_max_open_streams()
+ << ".";
+ // We may already have sent a connection close due to multiple reset
+ // streams in the same packet.
+ if (connection()->connected()) {
+ connection()->SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS);
}
+ return nullptr;
}
for (QuicStreamId id = largest_peer_created_stream_id_ + 2;
id < stream_id;
« no previous file with comments | « net/quic/quic_sent_entropy_manager_test.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698