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

Unified Diff: net/quic/quic_session.cc

Issue 682293004: Change the number of emulated connections in QUIC's congestion control (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_78853598
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_sent_packet_manager_test.cc ('k') | no next file » | 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 0449e533ea5f12958b88e3e7ef1adadffe1fd654..4e1fc7b927943b844c84e3e2da9c267aa47cfba7 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -428,6 +428,8 @@ void QuicSession::CloseStreamInner(QuicStreamId stream_id,
stream_map_.erase(it);
stream->OnClose();
+ // Decrease the number of streams being emulated when a new one is opened.
+ connection_->SetNumOpenStreams(stream_map_.size());
}
void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset(
@@ -595,6 +597,8 @@ void QuicSession::ActivateStream(QuicDataStream* stream) {
<< ". activating " << stream->id();
DCHECK_EQ(stream_map_.count(stream->id()), 0u);
stream_map_[stream->id()] = stream;
+ // Increase the number of streams being emulated when a new one is opened.
+ connection_->SetNumOpenStreams(stream_map_.size());
}
QuicStreamId QuicSession::GetNextStreamId() {
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698