Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/quic/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ void Session::Application::SendPendingData() {
// We call Application::ResumeStream directly (not Session::ResumeStream)
// to avoid creating a SendPendingDataScope — we're already inside
// SendPendingData and re-entering would just hit nwrite=0 again.
if (nwrite == 0) {
if (nwrite == 0 &&
(stream_data.id >= 0 || !session_->HasPendingDatagrams())) {
Debug(session_, "Congestion or not our turn to send");
if (stream_data.id >= 0 && (stream_data.count > 0 || stream_data.fin)) {
ResumeStream(stream_data.id);
Expand Down
1 change: 1 addition & 0 deletions src/quic/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,7 @@ datagram_id Session::SendDatagram(Store&& data) {
return did;
}
}
Session::SendPendingDataScope send_scope(this);

// Queue the datagram. It will be serialized into packets by
// SendPendingData alongside stream data.
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-quic-session-preferred-address-ipv6.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ const clientSession = await connect(serverEndpoint.address, {
family: 'ipv6',
},
},
maxDatagramSendAttempts: 100, // While the connection is restablished,
// all the acknowledgement packets of ngtcp2 are counted as send attempts
// so either this or a delay, or a change in ngtcp2 interfaces
});
await clientSession.opened;

Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-quic-session-preferred-address.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ const clientSession = await connect(serverEndpoint.address, {
strictEqual(oldRemote, null);
strictEqual(preferred, true);
}),
maxDatagramSendAttempts: 100, // While the connection is restablished,
// all the acknowledgement packets of ngtcp2 are counted as send attempts
// so either this or a delay, or a change in ngtcp2 interfaces
});
await clientSession.opened;

Expand Down
Loading