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

Unified Diff: net/quic/quic_session.cc

Issue 1457233003: Deprecate FLAGS_quic_count_unfinished_as_open_streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_flags.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 2a325d680a087dc95e36401f2292ee96cbbfb93f..0eba20fe96901177675db3c9ff84d4d7f0741430 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -712,31 +712,18 @@ bool QuicSession::IsClosedStream(QuicStreamId id) {
}
size_t QuicSession::GetNumOpenStreams() const {
- if (FLAGS_quic_count_unfinished_as_open_streams) {
- if (FLAGS_allow_many_available_streams) {
- return dynamic_stream_map_.size() - draining_streams_.size() +
- locally_closed_streams_highest_offset_.size();
- } else {
- return dynamic_stream_map_.size() + available_streams_.size() -
- draining_streams_.size() +
- locally_closed_streams_highest_offset_.size();
- }
+ if (FLAGS_allow_many_available_streams) {
+ return dynamic_stream_map_.size() - draining_streams_.size() +
+ locally_closed_streams_highest_offset_.size();
} else {
- if (FLAGS_allow_many_available_streams) {
- return dynamic_stream_map_.size() - draining_streams_.size();
- } else {
- return dynamic_stream_map_.size() + available_streams_.size() -
- draining_streams_.size();
- }
+ return dynamic_stream_map_.size() + available_streams_.size() -
+ draining_streams_.size() +
+ locally_closed_streams_highest_offset_.size();
}
}
size_t QuicSession::GetNumActiveStreams() const {
- if (FLAGS_quic_count_unfinished_as_open_streams) {
- return GetNumOpenStreams() - locally_closed_streams_highest_offset_.size();
- } else {
- return GetNumOpenStreams();
- }
+ return GetNumOpenStreams() - locally_closed_streams_highest_offset_.size();
}
size_t QuicSession::GetNumAvailableStreams() const {
@@ -776,12 +763,7 @@ bool QuicSession::HasDataToWrite() const {
void QuicSession::PostProcessAfterData() {
STLDeleteElements(&closed_streams_);
-
- // A buggy client may fail to send FIN/RSTs. Don't tolerate this.
- if (!FLAGS_quic_count_unfinished_as_open_streams &&
- locally_closed_streams_highest_offset_.size() > max_open_streams_) {
- CloseConnection(QUIC_TOO_MANY_UNFINISHED_STREAMS);
- }
+ closed_streams_.clear();
}
bool QuicSession::IsConnectionFlowControlBlocked() const {
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698