1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-07-29 03:41:11 +03:00

Add option to clone all CRYPTO packets at most once

Summary: Restore the buggy version of `cloneAllPacketsWithCryptoFrame`, which did allow up to two packets to be cloned in the same PTO flight but would only clone them at most once, as an optional mode of operation.

Reviewed By: mjoras

Differential Revision: D67994014

fbshipit-source-id: 16f66fd48a9a4410427ba21dea6e7f6d1eee48e6
This commit is contained in:
Jolene Tan
2025-01-15 14:08:52 -08:00
committed by Facebook GitHub Bot
parent a34b86f32a
commit a61b13a005
3 changed files with 27 additions and 11 deletions

View File

@ -938,6 +938,9 @@ SchedulingResult CloningScheduler::scheduleFramesForPacket(
if (std::find_if(frames.begin(), frames.end(), [](const auto& frame) {
return frame.type() == QuicWriteFrame::Type::WriteCryptoFrame;
}) != frames.end()) {
if (conn_.transportSettings.cloneCryptoPacketsAtMostOnce) {
continue;
}
auto mostRecentOutstandingPacketIdentifier =
conn_.outstandings.packets.back().maybeClonedPacketIdentifier;
if (mostRecentOutstandingPacketIdentifier ==