| Index: net/quic/quic_sent_packet_manager.cc
|
| diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
|
| index 1694da25415a1b5b1b198009716d601cb793f012..89f076877b28a3cd6efdf13b83fb5fc517bd93e2 100644
|
| --- a/net/quic/quic_sent_packet_manager.cc
|
| +++ b/net/quic/quic_sent_packet_manager.cc
|
| @@ -172,6 +172,10 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
|
| receive_buffer_bytes_ =
|
| max(kMinSocketReceiveBuffer,
|
| static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer()));
|
| + if (FLAGS_quic_limit_max_cwnd_to_receive_buffer) {
|
| + send_algorithm_->SetMaxCongestionWindow(receive_buffer_bytes_ *
|
| + kUsableRecieveBufferFraction);
|
| + }
|
| }
|
| send_algorithm_->SetFromConfig(config, perspective_, using_pacing_);
|
|
|
| @@ -791,8 +795,9 @@ QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
|
| if (pending_timer_transmission_count_ > 0) {
|
| return QuicTime::Delta::Zero();
|
| }
|
| - if (unacked_packets_.bytes_in_flight() >=
|
| - kUsableRecieveBufferFraction * receive_buffer_bytes_) {
|
| + if (!FLAGS_quic_limit_max_cwnd_to_receive_buffer &&
|
| + unacked_packets_.bytes_in_flight() >=
|
| + kUsableRecieveBufferFraction * receive_buffer_bytes_) {
|
| return QuicTime::Delta::Infinite();
|
| }
|
| return send_algorithm_->TimeUntilSend(
|
|
|