Skip to content

Commit

Permalink
Allow writing to be blocked during QuicConnection::SendAllPendingAcks
Browse files Browse the repository at this point in the history
  • Loading branch information
jellefoks committed Dec 3, 2024
1 parent 187d718 commit 864c5be
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions net/third_party/quiche/src/quiche/quic/core/quic_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5881,6 +5881,20 @@ void QuicConnection::SendAllPendingAcks() {
if (!earliest_ack_timeout.IsInitialized()) {
return;
}

static bool was_blocked = false;
if (writer_->IsWriteBlocked()) {
was_blocked = true;
LOG(INFO) << __FUNCTION__
<< " writer_->IsWriteBlocked()=" << writer_->IsWriteBlocked();
return;
}
if (was_blocked) {
was_blocked = false;
LOG(INFO) << __FUNCTION__
<< " writer_->IsWriteBlocked()=" << writer_->IsWriteBlocked();
}

for (int8_t i = INITIAL_DATA; i <= APPLICATION_DATA; ++i) {
const QuicTime ack_timeout = uber_received_packet_manager_.GetAckTimeout(
static_cast<PacketNumberSpace>(i));
Expand All @@ -5906,10 +5920,9 @@ void QuicConnection::SendAllPendingAcks() {
QuicFrames frames;
frames.push_back(uber_received_packet_manager_.GetUpdatedAckFrame(
static_cast<PacketNumberSpace>(i), clock_->ApproximateNow()));

const bool flushed = packet_creator_.FlushAckFrame(frames);
if (!flushed) {
LOG(INFO) << __FUNCTION__;
CHECK(!writer_->IsWriteBlocked());
// Connection is write blocked.
QUIC_BUG_IF(quic_bug_12714_33,
!writer_->IsWriteBlocked() &&
Expand Down

0 comments on commit 864c5be

Please sign in to comment.