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

Side by Side Diff: net/quic/quic_session.cc

Issue 1398403006: relnote: Create Quic version 28. The receiver refuses to create a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_protocol_test.cc ('k') | net/quic/quic_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/proof_verifier.h" 8 #include "net/quic/crypto/proof_verifier.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 id < stream_id; 672 id < stream_id;
673 id += 2) { 673 id += 2) {
674 available_streams_.insert(id); 674 available_streams_.insert(id);
675 } 675 }
676 largest_peer_created_stream_id_ = stream_id; 676 largest_peer_created_stream_id_ = stream_id;
677 } 677 }
678 if (FLAGS_allow_many_available_streams) { 678 if (FLAGS_allow_many_available_streams) {
679 // Check if the new number of open streams would cause the number of 679 // Check if the new number of open streams would cause the number of
680 // open streams to exceed the limit. 680 // open streams to exceed the limit.
681 if (GetNumOpenStreams() >= get_max_open_streams()) { 681 if (GetNumOpenStreams() >= get_max_open_streams()) {
682 CloseConnection(QUIC_TOO_MANY_OPEN_STREAMS); 682 if (connection()->version() <= QUIC_VERSION_27) {
683 CloseConnection(QUIC_TOO_MANY_OPEN_STREAMS);
684 } else {
685 // Refuse to open the stream.
686 SendRstStream(stream_id, QUIC_REFUSED_STREAM, 0);
687 }
683 return nullptr; 688 return nullptr;
684 } 689 }
685 } 690 }
686 ReliableQuicStream* stream = CreateIncomingDynamicStream(stream_id); 691 ReliableQuicStream* stream = CreateIncomingDynamicStream(stream_id);
687 if (stream == nullptr) { 692 if (stream == nullptr) {
688 return nullptr; 693 return nullptr;
689 } 694 }
690 ActivateStream(stream); 695 ActivateStream(stream);
691 return stream; 696 return stream;
692 } 697 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 } 793 }
789 for (auto const& kv : dynamic_stream_map_) { 794 for (auto const& kv : dynamic_stream_map_) {
790 if (kv.second->flow_controller()->IsBlocked()) { 795 if (kv.second->flow_controller()->IsBlocked()) {
791 return true; 796 return true;
792 } 797 }
793 } 798 }
794 return false; 799 return false;
795 } 800 }
796 801
797 } // namespace net 802 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol_test.cc ('k') | net/quic/quic_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698