| Index: net/quic/quic_session.cc
|
| diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
|
| index e4b163f30f3ff1d90f2793c21ac43ce8a647f0cc..f05395e77f56bf3c617e4ed8604de6bb3fbe3722 100644
|
| --- a/net/quic/quic_session.cc
|
| +++ b/net/quic/quic_session.cc
|
| @@ -7,7 +7,6 @@
|
| #include "base/stl_util.h"
|
| #include "net/quic/crypto/proof_verifier.h"
|
| #include "net/quic/quic_connection.h"
|
| -#include "net/quic/quic_flags.h"
|
| #include "net/quic/quic_flow_controller.h"
|
| #include "net/quic/quic_headers_stream.h"
|
| #include "net/ssl/ssl_info.h"
|
| @@ -438,7 +437,7 @@ void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset(
|
|
|
| DVLOG(1) << ENDPOINT << "Received final byte offset " << final_byte_offset
|
| << " for stream " << stream_id;
|
| - uint64 offset_diff = final_byte_offset - it->second;
|
| + QuicByteCount offset_diff = final_byte_offset - it->second;
|
| if (flow_controller_->UpdateHighestReceivedOffset(
|
| flow_controller_->highest_received_byte_offset() + offset_diff)) {
|
| // If the final offset violates flow control, close the connection now.
|
| @@ -465,20 +464,18 @@ void QuicSession::OnConfigNegotiated() {
|
| connection_->SetFromConfig(config_);
|
| QuicVersion version = connection()->version();
|
|
|
| - if (FLAGS_quic_allow_more_open_streams) {
|
| - uint32 max_streams = config_.MaxStreamsPerConnection();
|
| - if (is_server()) {
|
| - // A server should accept a small number of additional streams beyond the
|
| - // limit sent to the client. This helps avoid early connection termination
|
| - // when FIN/RSTs for old streams are lost or arrive out of order.
|
| - // Use a minimum number of additional streams, or a percentage increase,
|
| - // whichever is larger.
|
| - max_streams =
|
| - max(max_streams + kMaxStreamsMinimumIncrement,
|
| - static_cast<uint32>(max_streams * kMaxStreamsMultiplier));
|
| - }
|
| - set_max_open_streams(max_streams);
|
| + uint32 max_streams = config_.MaxStreamsPerConnection();
|
| + if (is_server()) {
|
| + // A server should accept a small number of additional streams beyond the
|
| + // limit sent to the client. This helps avoid early connection termination
|
| + // when FIN/RSTs for old streams are lost or arrive out of order.
|
| + // Use a minimum number of additional streams, or a percentage increase,
|
| + // whichever is larger.
|
| + max_streams =
|
| + max(max_streams + kMaxStreamsMinimumIncrement,
|
| + static_cast<uint32>(max_streams * kMaxStreamsMultiplier));
|
| }
|
| + set_max_open_streams(max_streams);
|
|
|
| if (version == QUIC_VERSION_19) {
|
| // QUIC_VERSION_19 doesn't support independent stream/session flow
|
| @@ -486,7 +483,8 @@ void QuicSession::OnConfigNegotiated() {
|
| if (config_.HasReceivedInitialFlowControlWindowBytes()) {
|
| // Streams which were created before the SHLO was received (0-RTT
|
| // requests) are now informed of the peer's initial flow control window.
|
| - uint32 new_window = config_.ReceivedInitialFlowControlWindowBytes();
|
| + QuicStreamOffset new_window =
|
| + config_.ReceivedInitialFlowControlWindowBytes();
|
| OnNewStreamFlowControlWindow(new_window);
|
| OnNewSessionFlowControlWindow(new_window);
|
| }
|
| @@ -508,7 +506,7 @@ void QuicSession::OnConfigNegotiated() {
|
| }
|
| }
|
|
|
| -void QuicSession::OnNewStreamFlowControlWindow(uint32 new_window) {
|
| +void QuicSession::OnNewStreamFlowControlWindow(QuicStreamOffset new_window) {
|
| if (new_window < kDefaultFlowControlSendWindow) {
|
| LOG(ERROR)
|
| << "Peer sent us an invalid stream flow control send window: "
|
| @@ -530,7 +528,7 @@ void QuicSession::OnNewStreamFlowControlWindow(uint32 new_window) {
|
| }
|
| }
|
|
|
| -void QuicSession::OnNewSessionFlowControlWindow(uint32 new_window) {
|
| +void QuicSession::OnNewSessionFlowControlWindow(QuicStreamOffset new_window) {
|
| if (new_window < kDefaultFlowControlSendWindow) {
|
| LOG(ERROR)
|
| << "Peer sent us an invalid session flow control send window: "
|
| @@ -563,9 +561,6 @@ void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
|
| // Discard originally encrypted packets, since they can't be decrypted by
|
| // the peer.
|
| connection_->NeuterUnencryptedPackets();
|
| - if (!FLAGS_quic_allow_more_open_streams) {
|
| - max_open_streams_ = config_.MaxStreamsPerConnection();
|
| - }
|
| break;
|
|
|
| default:
|
|
|