| 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 8a4690e5ea95de584547339d0940a0e62db4d463..553e7e2f69a188ed7a7c2bb78c34323ab5741cf7 100644
|
| --- a/net/quic/quic_sent_packet_manager.cc
|
| +++ b/net/quic/quic_sent_packet_manager.cc
|
| @@ -78,6 +78,7 @@ QuicSentPacketManager::QuicSentPacketManager(
|
| congestion_control_type,
|
| stats)),
|
| loss_algorithm_(LossDetectionInterface::Create(loss_type)),
|
| + receive_buffer_bytes_(kDefaultSocketReceiveBuffer),
|
| least_packet_awaited_by_peer_(1),
|
| first_rto_transmission_(0),
|
| consecutive_rto_count_(0),
|
| @@ -131,6 +132,11 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
|
| ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) {
|
| loss_algorithm_.reset(LossDetectionInterface::Create(kTime));
|
| }
|
| + if (config.HasReceivedSocketReceiveBuffer()) {
|
| + receive_buffer_bytes_ =
|
| + max(kMinSocketReceiveBuffer,
|
| + static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer()));
|
| + }
|
| send_algorithm_->SetFromConfig(config, is_server_);
|
|
|
| if (network_change_visitor_ != nullptr) {
|
| @@ -668,8 +674,9 @@ QuicSentPacketManager::RetransmissionTimeoutMode
|
| void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame(
|
| const QuicCongestionFeedbackFrame& frame,
|
| const QuicTime& feedback_receive_time) {
|
| - send_algorithm_->OnIncomingQuicCongestionFeedbackFrame(
|
| - frame, feedback_receive_time);
|
| + if (frame.type == kTCP) {
|
| + receive_buffer_bytes_ = frame.tcp.receive_window;
|
| + }
|
| }
|
|
|
| void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
|
| @@ -734,6 +741,9 @@ QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
|
| if (pending_timer_transmission_count_ > 0) {
|
| return QuicTime::Delta::Zero();
|
| }
|
| + if (unacked_packets_.bytes_in_flight() >= receive_buffer_bytes_) {
|
| + return QuicTime::Delta::Infinite();
|
| + }
|
| return send_algorithm_->TimeUntilSend(
|
| now, unacked_packets_.bytes_in_flight(), retransmittable);
|
| }
|
|
|